author | Claus Gittinger <cg@exept.de> |
Fri, 10 Sep 2004 15:50:16 +0200 | |
changeset 1398 | 21787ad15a01 |
parent 1397 | 3c62fc69c1ca |
child 1413 | b9087201c7aa |
permissions | -rw-r--r-- |
46 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by AEG Industry Automation |
|
3 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
4 |
All Rights Reserved |
|
5 |
||
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
13 |
||
957 | 14 |
"{ Package: 'stx:libbasic3' }" |
15 |
||
120 | 16 |
Object subclass:#HistoryManager |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
17 |
instanceVariableNames:'historyMode fullHistoryUpdate' |
149
f7d66ab71259
filter out previous Created line after a copy (get 2 of them after copyCategory in browser)
Claus Gittinger <cg@exept.de>
parents:
142
diff
changeset
|
18 |
classVariableNames:'TheOneAndOnlyInstance' |
f7d66ab71259
filter out previous Created line after a copy (get 2 of them after copyCategory in browser)
Claus Gittinger <cg@exept.de>
parents:
142
diff
changeset
|
19 |
poolDictionaries:'' |
f7d66ab71259
filter out previous Created line after a copy (get 2 of them after copyCategory in browser)
Claus Gittinger <cg@exept.de>
parents:
142
diff
changeset
|
20 |
category:'System-Changes-History' |
41 | 21 |
! |
22 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
23 |
Object subclass:#HistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
24 |
instanceVariableNames:'date time user what firstPositionInSourceCode type' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
25 |
classVariableNames:'Quote Separator ModifiedString DeletedString IndentString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
26 |
UseGECOS CreatedString AddedString' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
27 |
poolDictionaries:'' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
28 |
privateIn:HistoryManager |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
29 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
30 |
|
504 | 31 |
!HistoryManager class methodsFor:'documentation'! |
41 | 32 |
|
46 | 33 |
copyright |
34 |
" |
|
35 |
COPYRIGHT (c) 1995 by AEG Industry Automation |
|
36 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
37 |
All Rights Reserved |
|
38 |
||
39 |
This software is furnished under a license and may be used |
|
40 |
only in accordance with the terms of that license and with the |
|
41 |
inclusion of the above copyright notice. This software may not |
|
42 |
be provided or otherwise made available to, or used by, any |
|
43 |
other person. No title to or ownership of the software is |
|
44 |
hereby transferred. |
|
45 |
" |
|
46 |
! |
|
47 |
||
41 | 48 |
documentation |
49 |
" |
|
214 | 50 |
This class is part of the HistoryManagerProject. |
51 |
It helps to keep track of changes made to methods. |
|
41 | 52 |
|
214 | 53 |
All Methods and Classes in the system get a HistroyLine which |
54 |
contains a timestamp and the name of the changing user. |
|
55 |
This is acually the UniX loginname. |
|
56 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
57 |
The Manager registers itself to get notifications |
214 | 58 |
on change, intercepts them and appends a historyLine to the methods |
59 |
code. |
|
60 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
61 |
The HistoryManager can be turned on/off from aprivate.rc script, |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
62 |
or via the Launcher menu. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
63 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
64 |
The methods history line is filtered, to only contain one |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
65 |
entry per modifying user, containing the date of the last change. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
66 |
If fullHistoryMode is on, the classes history-ethod is also updated for |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
67 |
every change (containing every change). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
68 |
Full mode is enabled via: |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
69 |
HistoryManager fullHistoryUpdate:true |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
70 |
or via the Launchers compilation-settings dialog. |
41 | 71 |
|
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
72 |
claus: |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
73 |
I changed things to avoid depending on every class in the system. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
74 |
Now also catch Smalltalk change messages, related to class changes. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
75 |
|
235 | 76 |
[author:] |
77 |
Robert Sailer - AEG |
|
243 | 78 |
|
79 |
[see also:] |
|
80 |
HistoryLine |
|
81 |
||
82 |
[start with:] |
|
83 |
HistoryManager activate |
|
84 |
HistoryManager deactivate |
|
85 |
||
41 | 86 |
" |
87 |
! ! |
|
88 |
||
504 | 89 |
!HistoryManager class methodsFor:'initialization'! |
41 | 90 |
|
87 | 91 |
initMe |
214 | 92 |
"setup theOneAndOnly instance of myself (if not already present" |
93 |
||
87 | 94 |
^self new. |
95 |
||
214 | 96 |
"Modified: 14.8.1995 / 09:02:00 / robert" |
97 |
"Modified: 20.4.1996 / 20:33:44 / cg" |
|
87 | 98 |
! |
99 |
||
41 | 100 |
initialize |
214 | 101 |
"add myself as a dependent of ObjectMemory to be told about image restarts" |
102 |
||
41 | 103 |
ObjectMemory addDependent: self. |
104 |
||
214 | 105 |
"Modified: 14.8.1995 / 09:09:06 / robert" |
106 |
"Modified: 20.4.1996 / 20:34:09 / cg" |
|
41 | 107 |
! ! |
108 |
||
504 | 109 |
!HistoryManager class methodsFor:'instance creation'! |
41 | 110 |
|
111 |
new |
|
46 | 112 |
"because there can be only ONE HistoryManager, new must me redefiend" |
41 | 113 |
|
114 |
TheOneAndOnlyInstance isNil ifTrue:[ |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
115 |
TheOneAndOnlyInstance := super new initialize. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
116 |
HistoryLine initialize. |
41 | 117 |
]. |
118 |
||
119 |
^ TheOneAndOnlyInstance |
|
120 |
||
121 |
" |
|
122 |
||
123 |
HistoryManager new. |
|
124 |
" |
|
125 |
||
126 |
"Modified: 11.08.1995 / 17:01:29 / robert" |
|
127 |
! ! |
|
128 |
||
504 | 129 |
!HistoryManager class methodsFor:'accessing'! |
41 | 130 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
131 |
fullHistoryUpdate |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
132 |
"return true, if the historyManagement does full updates" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
133 |
|
626 | 134 |
TheOneAndOnlyInstance isNil ifTrue:[^ false]. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
135 |
^ TheOneAndOnlyInstance fullHistoryUpdate |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
136 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
137 |
"Modified: / 27.8.1995 / 00:32:12 / claus" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
138 |
"Created: / 24.10.1997 / 02:24:34 / cg" |
626 | 139 |
"Modified: / 29.10.1997 / 15:48:22 / cg" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
140 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
141 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
142 |
fullHistoryUpdate:aBoolean |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
143 |
"set/clear, full updates" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
144 |
|
626 | 145 |
TheOneAndOnlyInstance isNil ifTrue:[^ self]. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
146 |
TheOneAndOnlyInstance fullHistoryUpdate:aBoolean |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
147 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
148 |
"Modified: / 27.8.1995 / 00:32:12 / claus" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
149 |
"Created: / 24.10.1997 / 02:24:58 / cg" |
626 | 150 |
"Modified: / 29.10.1997 / 15:48:36 / cg" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
151 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
152 |
|
41 | 153 |
instance |
214 | 154 |
"return the one and only historyManager instance" |
41 | 155 |
|
214 | 156 |
^ TheOneAndOnlyInstance |
157 |
||
158 |
"Modified: 20.4.1996 / 20:31:18 / cg" |
|
41 | 159 |
! |
160 |
||
161 |
isActive |
|
214 | 162 |
"return true, if the historyManagement is activated" |
163 |
||
164 |
^ TheOneAndOnlyInstance notNil |
|
41 | 165 |
|
166 |
"Modified: 27.8.1995 / 00:32:12 / claus" |
|
214 | 167 |
"Modified: 20.4.1996 / 20:31:32 / cg" |
41 | 168 |
! ! |
169 |
||
504 | 170 |
!HistoryManager class methodsFor:'activation / deactivation'! |
41 | 171 |
|
172 |
activate |
|
214 | 173 |
"activate the HistoryManagement" |
174 |
||
41 | 175 |
self new "/ creating an instance activates me |
178 | 176 |
|
177 |
" |
|
178 |
HistoryManager activate |
|
179 |
" |
|
214 | 180 |
|
181 |
"Modified: 20.4.1996 / 20:31:46 / cg" |
|
41 | 182 |
! |
183 |
||
184 |
deactivate |
|
214 | 185 |
"deactivate the HistoryManagement" |
186 |
||
178 | 187 |
|mgr| |
188 |
||
189 |
mgr := TheOneAndOnlyInstance. |
|
532 | 190 |
mgr notNil ifTrue:[ |
191 |
mgr releaseDependencies. |
|
192 |
]. |
|
41 | 193 |
TheOneAndOnlyInstance := nil. |
194 |
||
178 | 195 |
" |
196 |
HistoryManager deactivate |
|
197 |
" |
|
214 | 198 |
|
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
199 |
"Modified: 8.1.1997 / 23:09:08 / cg" |
41 | 200 |
! ! |
201 |
||
504 | 202 |
!HistoryManager class methodsFor:'change & update'! |
87 | 203 |
|
320 | 204 |
update:what with:aParameter from:changedObject |
214 | 205 |
"intercepts system restart - reinstall mySelf as dependent of all classes" |
206 |
||
87 | 207 |
(what == #restarted) ifTrue:[ |
214 | 208 |
TheOneAndOnlyInstance notNil ifTrue:[ |
209 |
" |
|
210 |
smalltalk is about to restart from an Image - |
|
211 |
" |
|
87 | 212 |
"/ 'HistoryManager initialize (via update)' infoPrintNL. |
214 | 213 |
self initMe. |
214 |
] |
|
87 | 215 |
]. |
216 |
||
217 |
"Modified: 27.8.1995 / 16:33:02 / claus" |
|
214 | 218 |
"Modified: 20.4.1996 / 20:33:02 / cg" |
320 | 219 |
"Created: 15.6.1996 / 15:25:53 / cg" |
87 | 220 |
! ! |
221 |
||
504 | 222 |
!HistoryManager class methodsFor:'helpers'! |
47 | 223 |
|
1386 | 224 |
codeForInitialHistoryMethodIn:aClass |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
225 |
"create an initial (empty) history method" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
226 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
227 |
|histStream| |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
228 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
229 |
histStream := '' writeStream. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
230 |
histStream nextPutLine:'history'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
231 |
histStream nextPutLine:(HistoryLine newCreated printString). |
1386 | 232 |
^ histStream contents |
233 |
! |
|
234 |
||
235 |
createInitialHistoryMethodIn:aClass |
|
236 |
"create an initial (empty) history method" |
|
237 |
||
238 |
self obsoleteMethodWarning. |
|
1153
049b287ff099
use CodeGeneratorTool to compile (for history)
Claus Gittinger <cg@exept.de>
parents:
1081
diff
changeset
|
239 |
CodeGeneratorTool |
1386 | 240 |
compile:(self codeForInitialHistoryMethodIn:aClass) |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
241 |
forClass:aClass |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
242 |
inCategory:'documentation'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
243 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
244 |
"Created: / 24.10.1997 / 02:41:43 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
245 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
246 |
|
47 | 247 |
getAllHistoriesFrom:someString |
214 | 248 |
"returns anArray of HistoryLines from a string. |
249 |
Usually, the argument is a methods source code." |
|
47 | 250 |
|
251 |
|position aReadWriteStream firstFound nextFound aHistoryString rcOC h| |
|
252 |
||
253 |
"read begining from the end and look there for the first comment character. If there's none return" |
|
254 |
||
255 |
rcOC := OrderedCollection new. |
|
256 |
position := someString size. |
|
257 |
firstFound := false. |
|
258 |
nextFound := false. |
|
259 |
||
260 |
someString reverseDo:[ :aChar| |
|
214 | 261 |
position := position - 1. |
262 |
aChar == $" ifTrue:[ |
|
263 |
firstFound ifTrue:[ |
|
264 |
firstFound := false. |
|
265 |
nextFound := true. |
|
266 |
] ifFalse:[ |
|
267 |
aReadWriteStream := ReadWriteStream on: String new. |
|
268 |
firstFound := true. |
|
269 |
nextFound := false. |
|
270 |
]. |
|
271 |
]. |
|
272 |
(firstFound and: [nextFound not]) ifTrue:[ |
|
273 |
"now collect all up to the next comment character" |
|
274 |
aChar == $" ifFalse:[ |
|
275 |
aReadWriteStream nextPut: aChar. |
|
276 |
]. |
|
277 |
]. |
|
278 |
nextFound ifTrue:[ |
|
279 |
"End reached - now try to make a HistoryLine" |
|
280 |
aHistoryString := (aReadWriteStream contents) reverse. |
|
281 |
" |
|
258 | 282 |
Transcript showCR: aHistoryString. |
214 | 283 |
" |
284 |
h := HistoryLine fromString: aHistoryString at: position. |
|
285 |
h notNil ifTrue:[ |
|
286 |
rcOC add:h. |
|
287 |
]. |
|
47 | 288 |
"/ (aHistoryString startsWith: 'Modified:') ifTrue:[ |
289 |
"/ "a history line was found - now make a NewInstance of HistoryLine" |
|
290 |
"/ rcOC add: ( HistoryLine fromString: aHistoryString at: position). |
|
291 |
"/ ]. |
|
214 | 292 |
nextFound := false. |
293 |
]. |
|
47 | 294 |
]. |
295 |
||
296 |
^rcOC reverse "the OrderedCollection with HistoryLines in the right order" |
|
297 |
||
298 |
"Modified: 21.12.1993 / 18:32:30 / M.Noell" |
|
299 |
"Modified: 9.8.1995 / 22:45:30 / R.Sailer" |
|
300 |
"Modified: 8.9.1995 / 17:54:33 / claus" |
|
214 | 301 |
"Modified: 20.4.1996 / 20:33:22 / cg" |
192 | 302 |
! |
303 |
||
304 |
withoutHistoryLines:someString |
|
305 |
"given some methods sourceString, return a copy without any |
|
306 |
history lines" |
|
307 |
||
308 |
| pos sourceCode previousHistories | |
|
309 |
||
245 | 310 |
someString isNil ifTrue:[^ someString]. |
311 |
||
192 | 312 |
previousHistories := self getAllHistoriesFrom:someString. |
313 |
||
314 |
"extract source body." |
|
315 |
previousHistories isEmpty ifTrue: [ |
|
316 |
sourceCode := someString withoutSeparators. |
|
317 |
] ifFalse: [ |
|
318 |
pos := (previousHistories first) firstPositionInSourceCode. |
|
319 |
sourceCode := (someString copyFrom: 1 to: pos - 1) withoutSeparators. |
|
320 |
]. |
|
321 |
||
322 |
^ sourceCode |
|
323 |
||
245 | 324 |
" |
325 |
HistoryManager withoutHistoryLines:nil |
|
326 |
HistoryManager withoutHistoryLines:'' |
|
327 |
HistoryManager |
|
328 |
withoutHistoryLines:(HistoryManager class |
|
329 |
compiledMethodAt:#withoutHistoryLines:) source |
|
330 |
" |
|
331 |
||
192 | 332 |
"Created: 5.3.1996 / 15:11:12 / cg" |
245 | 333 |
"Modified: 30.4.1996 / 10:57:35 / cg" |
47 | 334 |
! ! |
335 |
||
41 | 336 |
!HistoryManager methodsFor:'accessing'! |
337 |
||
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
338 |
fullHistoryUpdate |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
339 |
"return the fullHistoryUpdate; |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
340 |
if true, the classes history method is also updated." |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
341 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
342 |
^ fullHistoryUpdate |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
343 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
344 |
"Modified: 11.08.1995 / 16:52:12 / robert" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
345 |
! |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
346 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
347 |
fullHistoryUpdate:aBoolean |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
348 |
"set the fullHistoryUpdate; |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
349 |
if true, the classes history method is also updated." |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
350 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
351 |
fullHistoryUpdate := aBoolean. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
352 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
353 |
"Modified: 11.08.1995 / 16:52:12 / robert" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
354 |
! |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
355 |
|
41 | 356 |
historyMode |
357 |
"return historyMode" |
|
358 |
||
359 |
^ historyMode |
|
360 |
||
361 |
"Modified: 11.08.1995 / 16:51:56 / robert" |
|
362 |
! |
|
363 |
||
364 |
historyMode:something |
|
365 |
"set historyMode" |
|
366 |
||
367 |
historyMode := something. |
|
368 |
||
369 |
"Modified: 11.08.1995 / 16:52:12 / robert" |
|
370 |
! ! |
|
371 |
||
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
372 |
!HistoryManager methodsFor:'change & update'! |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
373 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
374 |
update:something with:someArgument from:changedObject |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
375 |
"arrive here, whenever any class changed somehow. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
376 |
(something contains aSymbol describing what happened)" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
377 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
378 |
|sourceCode newMethod fileInOrRecompiling selector oldMethod what |
597
d8b3b9622b39
dont crash if oldSource is not available.
Claus Gittinger <cg@exept.de>
parents:
594
diff
changeset
|
379 |
changedClass whatChange oldSource| |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
380 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
381 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
382 |
"/ no action, if disabled |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
383 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
384 |
historyMode ifFalse:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
385 |
^ self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
386 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
387 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
388 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
389 |
"/ no action, if changeFile update is locked |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
390 |
"/ (since then, this may be a recompile or fileIn) |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
391 |
"/ |
743
a21b7562704b
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
739
diff
changeset
|
392 |
fileInOrRecompiling := Class updateChangeFileQuerySignal query. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
393 |
fileInOrRecompiling ifFalse:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
394 |
"/ Transcript showCR: '* noChange in history'. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
395 |
^ self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
396 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
397 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
398 |
" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
399 |
definition, instance / classVariables of a class have changed |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
400 |
" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
401 |
(something == #definition) ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
402 |
"/ it is a class definition that has changed |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
403 |
"/ add a line to the history method; if present |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
404 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
405 |
"/ Transcript show: 'Class definition: ', changedClass printString;cr. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
406 |
fullHistoryUpdate == true ifTrue:[ |
728
501a0a757440
oops - changedClass was never set in #definition-change
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
407 |
self addHistory:#modification with:'class definition' toHistoryMethodOf:changedObject. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
408 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
409 |
^ self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
410 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
411 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
412 |
"this is a sub item of #definition" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
413 |
(something == #classVariables) ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
414 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
415 |
"/ Transcript showCR: 'classVariables changed'. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
416 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
417 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
418 |
"/ does not yet work; |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
419 |
"/ (someArgument does not contain the class we are interested in) |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
420 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
421 |
fullHistoryUpdate == true ifTrue:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
422 |
self addHistory:#modification with:'class variables' toHistoryMethodOf:changedObject. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
423 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
424 |
^ self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
425 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
426 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
427 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
428 |
"/ new Class creation |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
429 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
430 |
((changedObject == Smalltalk) and:[something == #newClass]) ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
431 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
432 |
"/ add myself as dependents in order to get future change notifications |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
433 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
434 |
fullHistoryUpdate == true ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
435 |
self createHistoryMethodFor:someArgument. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
436 |
self addHistory:#creation with:nil toHistoryMethodOf:someArgument. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
437 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
438 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
439 |
"/ claus: old implementation |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
440 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
441 |
"/ someArgument addDependent: self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
442 |
"/ someArgument class addDependent: self. "for class methods" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
443 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
444 |
^ self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
445 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
446 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
447 |
"/ changed methods |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
448 |
"/ for backward compatibility, still handle the |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
449 |
"/ classes own change notification. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
450 |
"/ (only if I am a dependent of all classes) |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
451 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
452 |
changedObject isBehavior ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
453 |
changedClass := changedObject. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
454 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
455 |
something == #methodDictionary ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
456 |
whatChange := #methodDictionary. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
457 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
458 |
someArgument isArray ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
459 |
selector := someArgument at:1. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
460 |
oldMethod := someArgument at:2 |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
461 |
] ifFalse:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
462 |
selector := someArgument |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
463 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
464 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
465 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
466 |
something == #methodInClassRemoved ifTrue:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
467 |
fullHistoryUpdate == true ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
468 |
changedClass := someArgument at:1. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
469 |
selector := someArgument at:2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
470 |
self addHistory:#deletion with:('#' , selector) toHistoryMethodOf:changedClass. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
471 |
]. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
472 |
^ self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
473 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
474 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
475 |
something == #comment ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
476 |
whatChange := #comment. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
477 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
478 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
479 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
480 |
"/ the new mechanism; I only need to depend upon |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
481 |
"/ Smalltalk, to get all method changes |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
482 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
483 |
(changedObject == Smalltalk |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
484 |
and:[something == #methodInClass]) ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
485 |
changedClass := someArgument at:1. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
486 |
selector := someArgument at:2. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
487 |
oldMethod := someArgument at:3. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
488 |
whatChange := #methodDictionary. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
489 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
490 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
491 |
changedClass notNil ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
492 |
whatChange == #methodDictionary ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
493 |
"/ ok; it is a changed method |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
494 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
495 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
496 |
"/ fetch sourceString of the method |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
497 |
"/ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
498 |
sourceCode := changedClass sourceCodeAt:selector. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
499 |
sourceCode isNil ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
500 |
"method has been deleted" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
501 |
"/ Transcript showCR: 'method has been deleted'. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
502 |
fullHistoryUpdate == true ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
503 |
self addHistory:#deletion with:('#' , selector) toHistoryMethodOf:changedClass. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
504 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
505 |
^ self. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
506 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
507 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
508 |
newMethod := changedClass compiledMethodAt:selector. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
509 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
510 |
oldMethod notNil ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
511 |
oldSource := oldMethod source. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
512 |
oldSource notNil ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
513 |
(oldSource asString withTabsExpanded = sourceCode asString withTabsExpanded) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
514 |
"/ no change (accepted same code again ?) |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
515 |
^ self |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
516 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
517 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
518 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
519 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
520 |
"/ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
521 |
"/ dont add historylines to documentation methods ... |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
522 |
"/ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
523 |
(changedClass isMeta not |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
524 |
or:[newMethod category ~= 'documentation']) ifTrue:[ |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
525 |
oldMethod notNil ifTrue:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
526 |
what := #modification |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
527 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
528 |
what := #creation |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
529 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
530 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
531 |
"/ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
532 |
"/ update the history line-comment in |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
533 |
"/ the methods source |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
534 |
"/ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
535 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
536 |
sourceCode := self addHistory:what with:nil to:sourceCode filter:true. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
537 |
newMethod source: sourceCode. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
538 |
"/ Transcript showCR: 'history updated / added'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
539 |
]. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
540 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
541 |
fullHistoryUpdate == true ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
542 |
self addHistory:what with:('#' , selector) toHistoryMethodOf:changedClass. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
543 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
544 |
^self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
545 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
546 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
547 |
whatChange == #comment ifTrue:[ |
594 | 548 |
"the classes comment - we are no longer interested in that one" |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
549 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
550 |
^ self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
551 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
552 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
553 |
whatChange == #classDefinition ifTrue:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
554 |
"/ it is a class definition that has changed |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
555 |
"/ add a line to the history method; if present |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
556 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
557 |
"/ Transcript show: 'Class definition: ', changedClass printString;cr. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
558 |
fullHistoryUpdate == true ifTrue:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
559 |
self addHistory:#modification with:'class definition' toHistoryMethodOf:changedClass. |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
560 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
561 |
^self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
562 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
563 |
]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
564 |
"/ Transcript show: 'unhandled change: ', something printString;cr. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
565 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
566 |
^self |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
567 |
|
743
a21b7562704b
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
739
diff
changeset
|
568 |
"Modified: / 27.8.1995 / 02:14:43 / claus" |
a21b7562704b
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
739
diff
changeset
|
569 |
"Modified: / 24.10.1997 / 01:41:19 / cg" |
a21b7562704b
Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents:
739
diff
changeset
|
570 |
"Modified: / 18.3.1999 / 18:21:47 / stefan" |
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
571 |
! ! |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
572 |
|
41 | 573 |
!HistoryManager methodsFor:'initialization'! |
574 |
||
575 |
exclude |
|
46 | 576 |
"public - return an exclusionlist for some smalltalk classes which should not be notified or historisized" |
41 | 577 |
|
578 |
| oc | |
|
579 |
||
580 |
oc := OrderedCollection new. |
|
581 |
oc add: self. |
|
582 |
||
583 |
^oc |
|
584 |
||
585 |
"Modified: 11.08.1995 / 17:02:18 / robert" |
|
586 |
! |
|
587 |
||
588 |
initialize |
|
46 | 589 |
"public - make me depend on all smalltalk classes (except the exclusionList) |
590 |
to be notified later about changes. This intercepts source installation and allows |
|
591 |
be to patch the source-string with a historyLine." |
|
41 | 592 |
|
53 | 593 |
|exclusionlist| |
41 | 594 |
|
595 |
super initialize. |
|
596 |
historyMode := true. |
|
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
597 |
fullHistoryUpdate := false. |
41 | 598 |
exclusionlist := self exclude. |
599 |
||
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
600 |
"/ old implementation: |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
601 |
"/ made myself a dependent of all classes ... |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
602 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
603 |
"/ Smalltalk allClassesDo:[:aClass| |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
604 |
"/ "all classes should send a notification if changed" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
605 |
"/ "aClass = self " false ifFalse: [ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
606 |
"/ (exclusionlist includes: aClass) ifFalse:[ |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
607 |
"/ aClass addDependent: self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
608 |
"/ aClass class addDependent: self. "for class methods" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
609 |
"/ ]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
610 |
"/ ]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
611 |
"/ ]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
612 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
613 |
"/ old implementation: |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
614 |
"/ Smalltalk also sends class-change notifications ... |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
615 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
616 |
Smalltalk addDependent:self. |
41 | 617 |
|
618 |
^self |
|
619 |
||
531
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
620 |
"Modified: 11.8.1995 / 17:12:51 / robert" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
621 |
"Modified: 8.1.1997 / 23:07:14 / cg" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
622 |
! |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
623 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
624 |
releaseDependencies |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
625 |
"no longer depend on class changes" |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
626 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
627 |
"/ old implementation: |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
628 |
"/ made myself a dependent of all classes ... |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
629 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
630 |
"/ Smalltalk allClassesDo:[:aClass | |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
631 |
"/ aClass removeDependent:self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
632 |
"/ aClass class removeDependent:self. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
633 |
"/ ]. |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
634 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
635 |
"/ new implementation: |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
636 |
"/ Smalltalk also sends class-change notifications ... |
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
637 |
|
b0d7a291474d
changed to no longer depend on all classes,
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
638 |
Smalltalk removeDependent:self. |
41 | 639 |
! ! |
640 |
||
641 |
!HistoryManager methodsFor:'updateHistory'! |
|
642 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
643 |
addHistory:what with:argument to:someString filter:doFilter |
41 | 644 |
"private - add a historyLine at end to the sourceCode; |
140
8c22b3cf100d
changed methods which had no history get a Modified string (instead of Created)
Claus Gittinger <cg@exept.de>
parents:
120
diff
changeset
|
645 |
check for multiple lines of the same user and merge into one. |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
646 |
What may be one of #modification or #creation, to choose among |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
647 |
'Modified' or 'Created' lines." |
41 | 648 |
|
53 | 649 |
| histLines pos wStream sourceCode previousHistories |
47 | 650 |
newLine | |
41 | 651 |
|
53 | 652 |
"Check whether we want a history to be added" |
653 |
historyMode ifFalse:[ |
|
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
654 |
^ someString |
53 | 655 |
]. |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
656 |
|
47 | 657 |
previousHistories := self class getAllHistoriesFrom:someString. |
41 | 658 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
659 |
newLine := HistoryLine new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
660 |
|
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
661 |
what == #creation ifTrue:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
662 |
newLine isForCreation. |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
663 |
] ifFalse:[ |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
664 |
what == #deletion ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
665 |
newLine isForDeletion. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
666 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
667 |
what == #addition ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
668 |
newLine isForAddition. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
669 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
670 |
what == #modification ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
671 |
newLine isForModification. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
672 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
673 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
674 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
675 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
676 |
argument notNil ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
677 |
newLine what:argument |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
678 |
]. |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
679 |
|
41 | 680 |
"extract source body." |
681 |
previousHistories isEmpty ifTrue: [ |
|
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
682 |
sourceCode := someString withoutSeparators. |
41 | 683 |
] ifFalse: [ |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
684 |
pos := (previousHistories first) firstPositionInSourceCode. |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
685 |
sourceCode := (someString copyFrom: 1 to: pos - 1) withoutSeparators. |
41 | 686 |
]. |
687 |
||
688 |
"add the actual user's historyLine." |
|
47 | 689 |
previousHistories add:newLine. |
41 | 690 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
691 |
doFilter ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
692 |
"Filtering historyLines (each user with one entry)." |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
693 |
histLines := HistoryLine filterHistoryLines: previousHistories. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
694 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
695 |
histLines := previousHistories |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
696 |
]. |
41 | 697 |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
698 |
"create new method body with added historyLine" |
41 | 699 |
wStream := WriteStream on: String new. |
700 |
wStream nextPutAll: sourceCode; cr. |
|
701 |
||
702 |
"append the historyLines to the source" |
|
703 |
wStream cr. |
|
704 |
histLines do: [:hl | |
|
512
d38e6339cddb
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
504
diff
changeset
|
705 |
wStream nextPutLine:hl printString. |
41 | 706 |
]. |
707 |
||
512
d38e6339cddb
use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents:
504
diff
changeset
|
708 |
^ wStream contents. |
41 | 709 |
|
47 | 710 |
"Modified: 11.8.1995 / 16:51:50 / robert" |
711 |
"Modified: 8.9.1995 / 17:55:38 / claus" |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
712 |
"Created: 24.10.1997 / 00:16:38 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
713 |
"Modified: 24.10.1997 / 01:27:21 / cg" |
41 | 714 |
! |
715 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
716 |
addHistory:what with:arg toHistoryMethodOf:aClass |
214 | 717 |
"private - add a historyLine at end of the classes history methods |
718 |
source - if there is one" |
|
719 |
||
53 | 720 |
|cls historyMethod oldSource newSource| |
721 |
||
722 |
aClass isMeta ifFalse:[ |
|
214 | 723 |
cls := aClass class. |
53 | 724 |
] ifTrue:[ |
214 | 725 |
cls := aClass |
53 | 726 |
]. |
727 |
historyMethod := cls compiledMethodAt: #history. |
|
728 |
historyMethod notNil ifTrue:[ |
|
214 | 729 |
oldSource := historyMethod source. |
730 |
oldSource notNil ifTrue:[ |
|
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
731 |
newSource := self |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
732 |
addHistory:what |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
733 |
with:arg |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
734 |
to:oldSource |
1397 | 735 |
filter:true. |
214 | 736 |
historyMethod source:newSource. |
737 |
] |
|
53 | 738 |
] |
149
f7d66ab71259
filter out previous Created line after a copy (get 2 of them after copyCategory in browser)
Claus Gittinger <cg@exept.de>
parents:
142
diff
changeset
|
739 |
|
1397 | 740 |
"Created: / 12.10.1996 / 20:31:50 / cg" |
741 |
"Modified: / 24.10.1997 / 00:14:33 / cg" |
|
742 |
"Modified: / 1.9.2004 / 19:04:18 / janfrog" |
|
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
743 |
! |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
744 |
|
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
745 |
createHistoryMethodFor:aClass |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
746 |
"private - create a history method" |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
747 |
|
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
748 |
|cls| |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
749 |
|
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
750 |
aClass isMeta ifFalse:[ |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
751 |
cls := aClass class. |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
752 |
] ifTrue:[ |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
753 |
cls := aClass |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
754 |
]. |
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
755 |
|
497
abebd0d145e5
dont add a changeRecord for the automatically created history method.
Claus Gittinger <cg@exept.de>
parents:
494
diff
changeset
|
756 |
Class updateChangeFileQuerySignal answer:false do:[ |
1081 | 757 |
Class updateChangeListQuerySignal answer:false do:[ |
758 |
Compiler |
|
759 |
compile:'history' |
|
760 |
forClass:cls |
|
761 |
inCategory:'documentation' |
|
762 |
]. |
|
497
abebd0d145e5
dont add a changeRecord for the automatically created history method.
Claus Gittinger <cg@exept.de>
parents:
494
diff
changeset
|
763 |
]. |
494
6bc61cd32f7c
historyManager no longer sends #history;
Claus Gittinger <cg@exept.de>
parents:
320
diff
changeset
|
764 |
|
497
abebd0d145e5
dont add a changeRecord for the automatically created history method.
Claus Gittinger <cg@exept.de>
parents:
494
diff
changeset
|
765 |
"Modified: 14.10.1996 / 16:58:20 / cg" |
41 | 766 |
! ! |
767 |
||
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
768 |
!HistoryManager::HistoryLine class methodsFor:'converting'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
769 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
770 |
convertAStringToADate: aString |
1192
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
771 |
"kludge while not having the Time and Date format spec Class" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
772 |
|
690 | 773 |
| s day month year coll | |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
774 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
775 |
"delete delimiter from the date string" |
690 | 776 |
s := aString copyReplaceAll: $. with:(Character space) . |
1382 | 777 |
s replaceAll: $- with:(Character space). |
778 |
s replaceAll: $/ with:(Character space). |
|
690 | 779 |
coll := s asArrayOfSubstrings. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
780 |
day := (coll at: 1) asNumber. |
1383
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
781 |
month := Number readFrom:(coll at: 2 ) onError:nil. |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
782 |
month isNil ifTrue:[ |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
783 |
month := Date indexOfMonth:(coll at:2) language:#en. |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
784 |
month == 0 ifTrue:[ |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
785 |
month := Date indexOfMonth:(coll at:2). |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
786 |
]. |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
787 |
month == 0 ifTrue:[ |
1384
4e05f325b284
handle bad month in history line
Claus Gittinger <cg@exept.de>
parents:
1383
diff
changeset
|
788 |
self halt:'invalid month in history line'. |
4e05f325b284
handle bad month in history line
Claus Gittinger <cg@exept.de>
parents:
1383
diff
changeset
|
789 |
^ Date today. |
1383
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
790 |
]. |
e243ae633fac
handle monthname in history line
Claus Gittinger <cg@exept.de>
parents:
1382
diff
changeset
|
791 |
]. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
792 |
year := (coll at: 3 ) asNumber. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
793 |
|
1192
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
794 |
(year between:0 and:99) ifTrue:[ |
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
795 |
year := UserPreferences current twoDigitDateHandler value:year. |
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
796 |
]. |
739 | 797 |
^ Date newDay:day month:month year:year. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
798 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
799 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
800 |
HistoryLine convertAStringToADate:'18.10.1995' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
801 |
HistoryLine convertAStringToADate:'18.10.95' |
1192
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
802 |
HistoryLine convertAStringToADate:'18.10.01' |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
803 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
804 |
|
1382 | 805 |
"Modified: / 23-08-1995 / 21:28:58 / robert" |
806 |
"Modified: / 16-09-1997 / 14:35:03 / stefan" |
|
1384
4e05f325b284
handle bad month in history line
Claus Gittinger <cg@exept.de>
parents:
1383
diff
changeset
|
807 |
"Modified: / 17-03-2004 / 12:51:49 / cg" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
808 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
809 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
810 |
convertAStringToATime: aString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
811 |
"kludge while not having the Time and Date format spec Class" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
812 |
|
739 | 813 |
|h m s| |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
814 |
|
739 | 815 |
h := (aString copyFrom:1 to:2) asNumber. |
816 |
m := (aString copyFrom:4 to:5) asNumber. |
|
817 |
s := (aString copyFrom:7 to:8) asNumber. |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
818 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
819 |
|
739 | 820 |
^Time hours:h minutes:m seconds:s. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
821 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
822 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
823 |
HistoryLine convertAStringToATime:'18:23:15' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
824 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
825 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
826 |
"Modified: 15.08.1995 / 18:56:18 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
827 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
828 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
829 |
!HistoryManager::HistoryLine class methodsFor:'documentation'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
830 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
831 |
copyright |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
832 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
833 |
COPYRIGHT (c) 1995 by AEG Industry Automation |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
834 |
COPYRIGHT (c) 1995 by Claus Gittinger |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
835 |
All Rights Reserved |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
836 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
837 |
This software is furnished under a license and may be used |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
838 |
only in accordance with the terms of that license and with the |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
839 |
inclusion of the above copyright notice. This software may not |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
840 |
be provided or otherwise made available to, or used by, any |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
841 |
other person. No title to or ownership of the software is |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
842 |
hereby transferred. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
843 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
844 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
845 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
846 |
documentation |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
847 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
848 |
The class HistoryLine is part of the HistoryManagerProjcet. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
849 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
850 |
HistoryLine knows how to compose and parse comment lines which are |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
851 |
used to keep track of changes. These historyLines are added at the end of |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
852 |
a methods source code and to the special history classmethod. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
853 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
854 |
HistoryLine and HistoryManager where generously provided by AEG for inclusion into the |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
855 |
ST/X class delivery. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
856 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
857 |
[see also:] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
858 |
HistoryManager |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
859 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
860 |
[author:] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
861 |
Robert Sailer - AEG |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
862 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
863 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
864 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
865 |
examples |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
866 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
867 |
HistoryLine initialize. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
868 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
869 |
HistoryLine new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
870 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
871 |
HistoryLine for: 'R.Sailer'. for integration purposes ONLY |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
872 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
873 |
HistoryLine deleted. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
874 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
875 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
876 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
877 |
version |
1398 | 878 |
^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.57 2004-09-10 13:50:16 cg Exp $' |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
879 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
880 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
881 |
!HistoryManager::HistoryLine class methodsFor:'filtering'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
882 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
883 |
filterHistoryLines: aCollectionOfHistoryLines |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
884 |
"check the collection against multiple occurrence of the same user, |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
885 |
and remove all but the youngest (per user)." |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
886 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
887 |
|newCollection| |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
888 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
889 |
newCollection := OrderedCollection new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
890 |
aCollectionOfHistoryLines keysAndValuesDo:[:index :histLine | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
891 |
|skip| |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
892 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
893 |
skip := false. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
894 |
histLine isModified ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
895 |
"/ if there is another one, skip this |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
896 |
aCollectionOfHistoryLines from:index+1 do:[:anotherHistLine | |
1398 | 897 |
((anotherHistLine isModified |
898 |
and: [anotherHistLine user = histLine user]) |
|
899 |
and:[anotherHistLine what = histLine what]) |
|
900 |
ifTrue:[skip := true] |
|
901 |
]. |
|
902 |
skip ifFalse: [ |
|
903 |
aCollectionOfHistoryLines do: [:anotherHistLine | |
|
904 |
(anotherHistLine isCreated and: [anotherHistLine user = histLine user]) |
|
905 |
ifTrue: [ |
|
906 |
((AbsoluteTime |
|
907 |
fromDate: histLine date |
|
908 |
andTime: histLine time) - |
|
909 |
(AbsoluteTime |
|
910 |
fromDate: anotherHistLine date |
|
911 |
andTime: anotherHistLine time)) < self modificationLimit |
|
912 |
ifTrue: [skip := true] |
|
913 |
] |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
914 |
] |
1398 | 915 |
] |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
916 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
917 |
"/ filter out multiple created messages |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
918 |
"/ (this only occurs if a method was copied from ClassA to ClassB) |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
919 |
histLine isCreated ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
920 |
aCollectionOfHistoryLines from:index+1 do:[:anotherHistLine | |
1398 | 921 |
(anotherHistLine isCreated and:[anotherHistLine what = histLine what]) |
922 |
ifTrue:[skip := true] |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
923 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
924 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
925 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
926 |
skip ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
927 |
newCollection add:histLine. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
928 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
929 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
930 |
^ newCollection. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
931 |
|
1398 | 932 |
"Modified: / 8.9.1995 / 17:20:40 / claus" |
933 |
"Modified: / 20.4.1996 / 20:23:07 / cg" |
|
934 |
"Modified: / 20.6.2004 / 16:36:00 / masca" |
|
935 |
"Modified: / 1.9.2004 / 20:20:42 / janfrog" |
|
936 |
! |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
937 |
|
1398 | 938 |
modificationLimit |
939 |
"Answer the number of seconds between creation and |
|
940 |
modifcation of a method within which the modification |
|
941 |
line won't be added." |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
942 |
|
1398 | 943 |
^ 3600 "/one hour |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
944 |
|
1398 | 945 |
"Created: / 20.6.2004 / 16:32:35 / masca" |
946 |
"Modified: / 2.9.2004 / 15:33:09 / janfrog" |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
947 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
948 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
949 |
!HistoryManager::HistoryLine class methodsFor:'initialization'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
950 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
951 |
initialize |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
952 |
"setup class variables" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
953 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
954 |
Quote isNil ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
955 |
Quote := '"'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
956 |
Separator := '/'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
957 |
ModifiedString := 'Modified:'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
958 |
DeletedString := 'Deleted:'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
959 |
CreatedString := 'Created:'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
960 |
AddedString := 'Added:'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
961 |
IndentString := ' '. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
962 |
UseGECOS := false. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
963 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
964 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
965 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
966 |
HistoryLine initialize |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
967 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
968 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
969 |
"Modified: 23.8.1995 / 22:14:03 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
970 |
"Modified: 20.4.1996 / 20:23:29 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
971 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
972 |
"Modified: 24.10.1997 / 01:18:56 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
973 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
974 |
"Modified: / 24.10.1997 / 02:01:20 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
975 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
976 |
"Modified: 24.10.1997 02:07:16 cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
977 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
978 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
979 |
!HistoryManager::HistoryLine class methodsFor:'instance creation'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
980 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
981 |
fromString: aString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
982 |
"parses the argument, aString; |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
983 |
create & return a new Instance with the values" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
984 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
985 |
^ self fromString: aString at: 0. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
986 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
987 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
988 |
HistoryLine fromString: 'Modified: 01.12.93 / 18:32:30 / M.Noell' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
989 |
HistoryLine fromString: 'Created: 01.12.93 / 18:32:30 / M.Noell' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
990 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
991 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
992 |
"Modified: 23.8.1995 / 22:14:13 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
993 |
"Modified: 20.4.1996 / 20:24:47 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
994 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
995 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
996 |
fromString: aString at: position |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
997 |
"parses the String and creates a new Instance with the values. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
998 |
The positionvalue is normally used to remove the HistoryLines from the sourceCode. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
999 |
Claus: return nil, if the string is not a valid historyString." |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1000 |
|
728
501a0a757440
oops - changedClass was never set in #definition-change
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
1001 |
| inst anArray type aTime aDate userName idx what| |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1002 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1003 |
inst := self basicNew. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1004 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1005 |
anArray := aString asArrayOfSubstrings. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1006 |
anArray size < 5 ifTrue:[^ nil]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1007 |
anArray := anArray collect:[:word | word withoutSpaces]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1008 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1009 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1010 |
Modified / Deleted / Created |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1011 |
[what] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1012 |
Separator |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1013 |
date asString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1014 |
Separator |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1015 |
time asString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1016 |
Separator |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1017 |
UserName ... |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1018 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1019 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1020 |
type := anArray at:1. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1021 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1022 |
((Array |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1023 |
with:ModifiedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1024 |
with:DeletedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1025 |
with:CreatedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1026 |
with:AddedString) includes:type) ifFalse:[^ nil]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1027 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1028 |
inst type:type. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1029 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1030 |
"/ sigh backward compatibility ... |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1031 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1032 |
(anArray at:2) first isDigit ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1033 |
"/ date follows ... |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1034 |
idx := 2 |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1035 |
] ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1036 |
idx := anArray indexOf:Separator startingAt:2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1037 |
idx == 0 ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1038 |
"/ not a valid history string |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1039 |
^ nil |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1040 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1041 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1042 |
idx ~~ 2 ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1043 |
what := (anArray copyFrom:2 to:(idx-1)) asStringWith:(Character space). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1044 |
inst what:what. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1045 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1046 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1047 |
idx := idx + 1. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1048 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1049 |
aDate := self convertAStringToADate: (anArray at: idx). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1050 |
inst date: aDate. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1051 |
(anArray at:idx+1) ~= Separator ifTrue:[^ nil]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1052 |
idx := idx + 2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1053 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1054 |
aTime := self convertAStringToATime: (anArray at: idx). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1055 |
inst time: aTime. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1056 |
(anArray at:idx+1) ~= Separator ifTrue:[^ nil]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1057 |
idx := idx + 2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1058 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1059 |
"the user's name may be more that one word" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1060 |
userName := (anArray copyFrom:idx) asStringWith:Character space. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1061 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1062 |
inst user:userName. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1063 |
inst firstPositionInSourceCode:position. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1064 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1065 |
^ inst |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1066 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1067 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1068 |
HistoryLine fromString: 'Modified: 21.12.93 / 18:32:30 / R.Sailer' |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1069 |
HistoryLine fromString: 'Created: 21.12.1993 / 18:32:30 / Felicitas Gabriele Felger' |
1204 | 1070 |
HistoryLine fromString: 'Deleted: 21.12.93 / 18:32:30 / Astrid Weisseise' |
1071 |
HistoryLine fromString: 'Deleted: foo bar / 21.12.93 / 18:32:30 / Astrid Weisseise' |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1072 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1073 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1074 |
"Modified: / 23.8.1995 / 22:24:47 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1075 |
"Modified: / 19.9.1995 / 14:14:48 / claus" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1076 |
"Modified: / 24.10.1997 / 02:10:01 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1077 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1078 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1079 |
new |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1080 |
"get a new history line. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1081 |
Preinitialize it as a modified-Line for the current user" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1082 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1083 |
^ self type:ModifiedString what:nil |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1084 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1085 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1086 |
newCreated |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1087 |
"public - get a new created-Line for the current user" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1088 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1089 |
^ self type:CreatedString what:nil |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1090 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1091 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1092 |
HistoryLine newCreated |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1093 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1094 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1095 |
"Modified: 23.8.1995 / 22:14:24 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1096 |
"Modified: 24.10.1997 / 00:18:30 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1097 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1098 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1099 |
!HistoryManager::HistoryLine class methodsFor:'private'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1100 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1101 |
currentUserName |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1102 |
"return the current users name - |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1103 |
thats either the userInfos-gecos field, or the users login name." |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1104 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1105 |
UseGECOS == true ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1106 |
^ OperatingSystem getFullUserName. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1107 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1108 |
^ (OperatingSystem getLoginName). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1109 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1110 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1111 |
HistoryLine currentUserName |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1112 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1113 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1114 |
"Modified: 15.7.1996 / 12:43:14 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1115 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1116 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1117 |
type:type what:what |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1118 |
"private - for integration purposes only" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1119 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1120 |
| inst | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1121 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1122 |
inst := self basicNew. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1123 |
inst date: Date today. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1124 |
inst time: Time now. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1125 |
inst firstPositionInSourceCode: 0. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1126 |
inst user:(self currentUserName). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1127 |
inst type:type. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1128 |
inst what:what. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1129 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1130 |
^ inst |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1131 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1132 |
"Modified: 23.08.1995 / 21:35:44 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1133 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1134 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1135 |
!HistoryManager::HistoryLine methodsFor:'accessing'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1136 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1137 |
date |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1138 |
"return the date" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1139 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1140 |
^ date |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1141 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1142 |
"Modified: 20.4.1996 / 20:22:12 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1143 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1144 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1145 |
date:something |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1146 |
"set the date" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1147 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1148 |
date := something. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1149 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1150 |
"Modified: 20.4.1996 / 20:22:16 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1151 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1152 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1153 |
firstPositionInSourceCode |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1154 |
"return firstPositionInSourceCode" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1155 |
|
1081 | 1156 |
^ firstPositionInSourceCode |
1157 |
! |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1158 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1159 |
firstPositionInSourceCode:something |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1160 |
"set firstPositionInSourceCode" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1161 |
|
1081 | 1162 |
firstPositionInSourceCode := something. |
1163 |
! |
|
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1164 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1165 |
isForAddition |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1166 |
type := AddedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1167 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1168 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1169 |
isForCreation |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1170 |
type := CreatedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1171 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1172 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1173 |
isForDeletion |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1174 |
type := DeletedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1175 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1176 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1177 |
isForModification |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1178 |
type := ModifiedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1179 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1180 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1181 |
time |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1182 |
"return the time" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1183 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1184 |
^ time |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1185 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1186 |
"Modified: 20.4.1996 / 20:22:04 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1187 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1188 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1189 |
time:something |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1190 |
"set the time" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1191 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1192 |
time := something. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1193 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1194 |
"Modified: 20.4.1996 / 20:21:58 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1195 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1196 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1197 |
type |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1198 |
"return the type" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1199 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1200 |
^ type |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1201 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1202 |
"Modified: 20.4.1996 / 20:21:54 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1203 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1204 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1205 |
type:something |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1206 |
"set the type" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1207 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1208 |
type := something. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1209 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1210 |
"Modified: 20.4.1996 / 20:21:39 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1211 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1212 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1213 |
user |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1214 |
"return the user" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1215 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1216 |
^ user |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1217 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1218 |
"Modified: 20.4.1996 / 20:21:45 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1219 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1220 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1221 |
user:something |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1222 |
"set the user" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1223 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1224 |
user := something. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1225 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1226 |
"Modified: 20.4.1996 / 20:21:48 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1227 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1228 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1229 |
what |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1230 |
"return the what-changed info" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1231 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1232 |
^ what |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1233 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1234 |
"Modified: 20.4.1996 / 20:21:54 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1235 |
"Created: 24.10.1997 / 00:20:33 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1236 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1237 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1238 |
what:someStringOrSelector |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1239 |
"set the what-changed info" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1240 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1241 |
what := someStringOrSelector |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1242 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1243 |
"Modified: 20.4.1996 / 20:21:54 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1244 |
"Created: 24.10.1997 / 00:21:00 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1245 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1246 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1247 |
!HistoryManager::HistoryLine methodsFor:'comparing'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1248 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1249 |
= aHistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1250 |
"compares two instances of HistoryLine" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1251 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1252 |
(aHistoryLine user = self user) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1253 |
(aHistoryLine date = self date) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1254 |
(aHistoryLine time = self time) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1255 |
(aHistoryLine type = self type) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1256 |
(aHistoryLine what = self what) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1257 |
^ true |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1258 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1259 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1260 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1261 |
] |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1262 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1263 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1264 |
^ false |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1265 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1266 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1267 |
| h1 h2 | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1268 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1269 |
h1 := HistoryLine for: OperatingSystem getLoginName. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1270 |
h2 := h1 copy. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1271 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1272 |
h1 = h2 ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1273 |
InfoBox new title: 'users are equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1274 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1275 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1276 |
h2 := HistoryLine for: OperatingSystem getLoginName. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1277 |
h1 = h2 ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1278 |
InfoBox new title: 'users are not equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1279 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1280 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1281 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1282 |
"Modified: 23.8.1995 / 22:26:40 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1283 |
"Modified: 24.10.1997 / 00:22:09 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1284 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1285 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1286 |
hash |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1287 |
"return a hash key for the receiver" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1288 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1289 |
^user hash |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1290 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1291 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1292 |
Check hashCode |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1293 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1294 |
|h1 h2 oc | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1295 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1296 |
h1 := HistoryLine new hash. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1297 |
h2 := HistoryLine new hash. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1298 |
oc := OrderedCollection new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1299 |
oc add: h1. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1300 |
oc add: h2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1301 |
^oc |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1302 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1303 |
using hash in a set: |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1304 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1305 |
| h1 h2 aSet oc | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1306 |
h1 := HistoryLine new hash. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1307 |
h2 := HistoryLine new hash. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1308 |
oc := OrderedCollection new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1309 |
oc add: h1. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1310 |
oc add: h2. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1311 |
aSet := oc asSet. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1312 |
^aSet |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1313 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1314 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1315 |
"Modified: 23.08.1995 / 22:26:44 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1316 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1317 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1318 |
sameDate: aHistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1319 |
"returns true if aUserName = user in preperation for a SortedCollection of HistoryLines" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1320 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1321 |
^aHistoryLine date = date |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1322 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1323 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1324 |
| h1 h2 | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1325 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1326 |
h1 := HistoryLine new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1327 |
h2 := h1 copy. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1328 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1329 |
(h1 sameDate: h2) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1330 |
InfoBox new title: 'Dates are equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1331 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1332 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1333 |
h2 := HistoryLine for: 'R.Sailer'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1334 |
h2 date: (Date day: 12 month: 6 year:1981). |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1335 |
(h1 sameDate: h2) ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1336 |
InfoBox new title: 'users are not equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1337 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1338 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1339 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1340 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1341 |
"Modified: 23.08.1995 / 22:26:47 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1342 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1343 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1344 |
sameType: aHistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1345 |
"returns true if the Type = type in preperation for a SortedCollection of HistoryLines" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1346 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1347 |
^aHistoryLine type = type |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1348 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1349 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1350 |
| h1 h2 | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1351 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1352 |
h1 := HistoryLine new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1353 |
h2 := h1 copy. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1354 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1355 |
(h1 sameType: h2) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1356 |
InfoBox new title: 'Types are equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1357 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1358 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1359 |
h2 := HistoryLine createdBy: 'R.Sailer'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1360 |
(h1 sameType: h2) ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1361 |
InfoBox new title: 'Types are not equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1362 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1363 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1364 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1365 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1366 |
"Modified: 23.08.1995 / 22:26:49 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1367 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1368 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1369 |
sameUser: aHistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1370 |
"returns true if aUserName = user in preperation for a SortedCollection of HistoryLines" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1371 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1372 |
^aHistoryLine user = user |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1373 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1374 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1375 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1376 |
| h1 h2 | |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1377 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1378 |
h1 := HistoryLine new. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1379 |
h2 := h1 copy. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1380 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1381 |
(h1 sameUser: h2) ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1382 |
InfoBox new title: 'users are equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1383 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1384 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1385 |
h2 := HistoryLine for: 'R.Sailer'. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1386 |
(h1 sameUser: h2) ifFalse:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1387 |
InfoBox new title: 'users are not equal'; show. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1388 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1389 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1390 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1391 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1392 |
"Modified: 23.08.1995 / 22:26:51 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1393 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1394 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1395 |
sameWhat: aHistoryLine |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1396 |
"returns true if the what = type in preperation for a SortedCollection of HistoryLines" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1397 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1398 |
^aHistoryLine what = what |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1399 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1400 |
"Created: 24.10.1997 / 00:21:46 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1401 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1402 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1403 |
!HistoryManager::HistoryLine methodsFor:'printing & storing'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1404 |
|
643
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1405 |
printOn:aStream |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1406 |
"return a printed representation of a HistoryLine as a string" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1407 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1408 |
aStream nextPutAll:IndentString. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1409 |
aStream nextPutAll:Quote. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1410 |
aStream nextPutAll:type. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1411 |
what notNil ifTrue:[ |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1412 |
aStream space. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1413 |
aStream nextPutAll:what. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1414 |
]. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1415 |
aStream space; nextPutAll:Separator; space. |
1371
e537165f5215
date printing (language specifics)
Claus Gittinger <cg@exept.de>
parents:
1204
diff
changeset
|
1416 |
date printOn:aStream language:#en. |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1417 |
aStream space; nextPutAll:Separator; space. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1418 |
time print24HourFormatOn:aStream. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1419 |
aStream space; nextPutAll:Separator; space. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1420 |
aStream nextPutAll:user. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1421 |
aStream nextPutAll:Quote. |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1422 |
|
643
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1423 |
" |
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1424 |
self new printOn:Transcript |
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1425 |
" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1426 |
|
643
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1427 |
"Modified: / 24.10.1997 / 02:07:23 / cg" |
360e30f96f4b
Define #printOn: instead of #printString
Stefan Vogel <sv@exept.de>
parents:
635
diff
changeset
|
1428 |
"Modified: / 20.1.1998 / 12:58:53 / stefan" |
624
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1429 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1430 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1431 |
!HistoryManager::HistoryLine methodsFor:'queries'! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1432 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1433 |
isCreated |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1434 |
"returns true if the bodytext is CreatedString" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1435 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1436 |
^type = CreatedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1437 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1438 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1439 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1440 |
HistoryLine new isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1441 |
(HistoryLine for: 'R.Sailer') isCreated |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1442 |
(HistoryLine createdBy: 'R.Sailer') isCreated |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1443 |
HistoryLine deleted isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1444 |
(HistoryLine deletedBy: 'M.Noell') isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1445 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1446 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1447 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1448 |
"Modified: 23.8.1995 / 22:30:23 / robert" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1449 |
"Modified: 20.4.1996 / 20:20:36 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1450 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1451 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1452 |
isDeleted |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1453 |
"returns true if the bodytext is DeletedString" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1454 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1455 |
^type = DeletedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1456 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1457 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1458 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1459 |
HistoryLine deleted isDeleted |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1460 |
HistoryLine new isDeleted |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1461 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1462 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1463 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1464 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1465 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1466 |
"Modified: 20.4.1996 / 20:20:32 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1467 |
! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1468 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1469 |
isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1470 |
"returns true if the bodytext is ModifiedString" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1471 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1472 |
^type = ModifiedString |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1473 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1474 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1475 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1476 |
HistoryLine new isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1477 |
(HistoryLine for: 'R.Sailer') isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1478 |
HistoryLine deleted isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1479 |
(HistoryLine deletedBy: 'M.Noell') isModified |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1480 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1481 |
" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1482 |
|
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1483 |
"Modified: 20.4.1996 / 20:20:29 / cg" |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1484 |
! ! |
93c286b0509a
much better history in history method
Claus Gittinger <cg@exept.de>
parents:
597
diff
changeset
|
1485 |
|
504 | 1486 |
!HistoryManager class methodsFor:'documentation'! |
119 | 1487 |
|
1488 |
version |
|
1398 | 1489 |
^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.57 2004-09-10 13:50:16 cg Exp $' |
119 | 1490 |
! ! |
1192
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
1491 |
|
41 | 1492 |
HistoryManager initialize! |
1192
5aea356953d7
Senders use Userpreference setting to choose conversion
Claus Gittinger <cg@exept.de>
parents:
1153
diff
changeset
|
1493 |
HistoryManager::HistoryLine initialize! |