author | Claus Gittinger <cg@exept.de> |
Thu, 21 Mar 1996 16:33:40 +0100 | |
changeset 1113 | 840b03d131d7 |
parent 1107 | e0411b74b808 |
child 1116 | a3c136969f7c |
permissions | -rw-r--r-- |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
153 | 3 |
All Rights Reserved |
1 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
719
c557a530f971
dont appending a chunk-separator to the initial copyright
Claus Gittinger <cg@exept.de>
parents:
717
diff
changeset
|
13 |
ClassDescription subclass:#Class |
741
c6b4e7f026be
dont crash in #revision if info is there, but has no revision field
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
14 |
instanceVariableNames:'classvars comment subclasses classFilename package revision |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
15 |
history' |
741
c6b4e7f026be
dont crash in #revision if info is there, but has no revision field
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
16 |
classVariableNames:'UpdatingChanges LockChangesFile FileOutErrorSignal |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
17 |
CatchMethodRedefinitions MethodRedefinitionSignal |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
18 |
UpdateChangeFileQuerySignal TryLocalSourceFirst |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
19 |
ChangeFileAccessLock' |
741
c6b4e7f026be
dont crash in #revision if info is there, but has no revision field
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
20 |
poolDictionaries:'' |
c6b4e7f026be
dont crash in #revision if info is there, but has no revision field
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
21 |
category:'Kernel-Classes' |
1 | 22 |
! |
23 |
||
68 | 24 |
!Class class methodsFor:'documentation'! |
25 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
26 |
copyright |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
27 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
28 |
COPYRIGHT (c) 1989 by Claus Gittinger |
527
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
29 |
All Rights Reserved |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
30 |
|
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
31 |
This software is furnished under a license and may be used |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
32 |
only in accordance with the terms of that license and with the |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
33 |
inclusion of the above copyright notice. This software may not |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
34 |
be provided or otherwise made available to, or used by, any |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
35 |
other person. No title to or ownership of the software is |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
36 |
hereby transferred. |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
37 |
" |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
38 |
! |
7eedfdb0db62
try revisionString for revision-number as well
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
39 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
40 |
documentation |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
41 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
42 |
Class adds more functionality to classes; minimum stuff has already |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
43 |
been defined in Behavior and ClassDescription; this adds naming, categories etc. |
68 | 44 |
|
45 |
Also change management and recompilation is defined here (since the superclasses |
|
46 |
do not have enough symbolic information to support compilation). |
|
47 |
||
168 | 48 |
For production code, the stc compiler is planned to (optionally) generate classes |
49 |
as subclasses of Behavior - to excludes all name, source info etc., |
|
68 | 50 |
however, normally all classes are subclasses of Class. |
51 |
||
52 |
Instance variables: |
|
53 |
||
153 | 54 |
classvars <String> the names of the class variables |
168 | 55 |
|
56 |
comment <String> the classes comment; either a string, |
|
57 |
a number specifying the offset in classFilename, or nil |
|
58 |
||
153 | 59 |
subclasses <Collection> cached collection of subclasses |
60 |
(currently unused - but will be soon) |
|
168 | 61 |
|
62 |
classFilename <String> the file (or nil) where the classes |
|
63 |
sources are found |
|
64 |
||
153 | 65 |
package <Symbol> the package, in which the class was defined |
385 | 66 |
(inserted by compilers) |
67 |
||
391 | 68 |
revision <String> revision string - inserted by stc |
168 | 69 |
|
70 |
history <any> a place for a history string (not currently used) |
|
68 | 71 |
|
72 |
Class variables: |
|
73 |
||
153 | 74 |
UpdatingChanges <Boolean> true if the changes-file shall be updated |
75 |
(except during startup and when filing in, this flag |
|
76 |
is usually true) |
|
68 | 77 |
|
488
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
78 |
LockChangesFile <Boolean> if true, the change file is locked for updates. |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
79 |
Required when multiple users operate on a common |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
80 |
change file. |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
81 |
This is an experimental new feature, being evaluated. |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
82 |
|
421 | 83 |
UpdateChangeFileQuerySignal used as an upQuery from the change management. |
84 |
Whenever a changeRecord is to be written, |
|
85 |
this signal is raised and a handler (if present) |
|
86 |
is supposed to return true or false. |
|
87 |
If unhandled, the value of the global |
|
88 |
UpdatingChanges is returned for backward |
|
89 |
compatibility (which means that the old |
|
90 |
mechanism is used if no query-handler |
|
91 |
is present). |
|
92 |
||
168 | 93 |
FileOutErrorSignal raised when an error occurs during fileOut |
94 |
||
362 | 95 |
CatchMethodRedefinitions if true, classes protect themself |
96 |
MethodRedefinitionSignal (by raising MethodRedefinitionSignal) |
|
97 |
from redefining any existing methods, |
|
98 |
which are defined in another package. |
|
99 |
(i.e. a signal will be raised, if you |
|
100 |
fileIn something which redefines an |
|
101 |
existing method and the packages do not |
|
102 |
match). |
|
103 |
The default is (currently) true. |
|
104 |
||
892
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
105 |
TryLocalSourceFirst If true, local source files are tried |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
106 |
first BEFORE the sourceCodeManager is |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
107 |
consulted. If false, the sourceCodeManager |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
108 |
is asked first. |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
109 |
Should be turned on, if you run an image from |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
110 |
local sources which have not yet been checked in. |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
111 |
|
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
112 |
|
68 | 113 |
WARNING: layout known by compiler and runtime system |
114 |
" |
|
662 | 115 |
! ! |
68 | 116 |
|
1 | 117 |
!Class class methodsFor:'initialization'! |
118 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
119 |
initialize |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
120 |
"the classvariable 'UpdatingChanges' controls if changes are put |
1 | 121 |
into the changes-file; normally this variable is set to true, but |
68 | 122 |
(for example) during fileIn or when changes are applied, it is set to false |
123 |
to avoid putting too much junk into the changes-file." |
|
1 | 124 |
|
153 | 125 |
UpdatingChanges := true. |
488
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
126 |
LockChangesFile := false. |
362 | 127 |
CatchMethodRedefinitions := true. |
909 | 128 |
TryLocalSourceFirst := false. |
362 | 129 |
|
153 | 130 |
FileOutErrorSignal isNil ifTrue:[ |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
131 |
FileOutErrorSignal := ErrorSignal newSignalMayProceed:false. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
132 |
FileOutErrorSignal nameClass:self message:#fileOutErrorSignal. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
133 |
FileOutErrorSignal notifierString:'error during fileOut'. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
134 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
135 |
MethodRedefinitionSignal := ErrorSignal newSignalMayProceed:true. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
136 |
MethodRedefinitionSignal nameClass:self message:#methodRedefinitionSignal. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
137 |
MethodRedefinitionSignal notifierString:'attempt to redefine method from different package'. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
138 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
139 |
UpdateChangeFileQuerySignal := QuerySignal new mayProceed:true. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
140 |
UpdateChangeFileQuerySignal nameClass:self message:#updateChangeFileQuerySignal. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
141 |
UpdateChangeFileQuerySignal notifierString:'asking if changeFile update is wanted'. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
142 |
UpdateChangeFileQuerySignal handlerBlock:[:ex | ex proceedWith:UpdatingChanges]. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
143 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
144 |
ChangeFileAccessLock := Semaphore forMutualExclusion. |
153 | 145 |
] |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
146 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
147 |
"Modified: 21.3.1996 / 16:31:30 / cg" |
153 | 148 |
! ! |
149 |
||
345 | 150 |
!Class class methodsFor:'Signal constants'! |
153 | 151 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
152 |
fileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
153 |
"return the signal raised when an error occurs while fileing out. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
154 |
This is signalled to allow browsers some user feed back in case |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
155 |
a fileout fails (for example due to disk-full errors)" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
156 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
157 |
^ FileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
158 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
159 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
160 |
methodRedefinitionSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
161 |
"return the signal raised when a method is about to be installed |
362 | 162 |
which redefines an existing method and the methods packages are not |
163 |
equal. This helps when filing in alien code, to prevent existing |
|
164 |
methods to be overwritten or redefined by incompatible methods" |
|
165 |
||
166 |
^ MethodRedefinitionSignal |
|
555 | 167 |
! |
168 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
169 |
updateChangeFileQuerySignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
170 |
"return the signal used as an upQuery if the changeFile should be updated. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
171 |
If unhandled, the value of UpdatingChanges is returned by the signals |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
172 |
static handler." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
173 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
174 |
^ UpdateChangeFileQuerySignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
175 |
|
362 | 176 |
! ! |
177 |
||
178 |
!Class class methodsFor:'accessing - flags'! |
|
179 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
180 |
catchMethodRedefinitions |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
181 |
"return the redefinition catching flag." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
182 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
183 |
^ CatchMethodRedefinitions |
556 | 184 |
! |
185 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
186 |
catchMethodRedefinitions:aBoolean |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
187 |
"turn on/off redefinition catching. Return the prior value of the flag." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
188 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
189 |
|prev| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
190 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
191 |
prev := CatchMethodRedefinitions. |
556 | 192 |
CatchMethodRedefinitions := aBoolean. |
193 |
^ prev |
|
194 |
! |
|
195 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
196 |
lockChangesFile |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
197 |
"return true, if the change file is locked during update" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
198 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
199 |
^ LockChangesFile |
555 | 200 |
! |
201 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
202 |
lockChangesFile:aBoolean |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
203 |
"turn on/off change-file-locking. Return the previous value of the flag." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
204 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
205 |
|prev| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
206 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
207 |
prev := LockChangesFile. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
208 |
LockChangesFile := aBoolean. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
209 |
^ prev |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
210 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
211 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
212 |
tryLocalSourceFirst |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
213 |
^ TryLocalSourceFirst |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
214 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
215 |
"Created: 24.1.1996 / 19:55:35 / cg" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
216 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
217 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
218 |
tryLocalSourceFirst:aBoolean |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
219 |
TryLocalSourceFirst := aBoolean |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
220 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
221 |
"Created: 24.1.1996 / 19:55:35 / cg" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
222 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
223 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
224 |
updateChanges:aBoolean |
858 | 225 |
"turn on/off changes management. Return the prior value of the flag. |
226 |
This value is used as a default fallback - a querySignal handler may still |
|
227 |
decide to return something else." |
|
362 | 228 |
|
229 |
|prev| |
|
230 |
||
555 | 231 |
prev := UpdatingChanges. |
232 |
UpdatingChanges := aBoolean. |
|
362 | 233 |
^ prev |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
234 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
235 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
236 |
updatingChanges |
858 | 237 |
"return true if changes are recorded. |
238 |
The value returned here is the default fallback - a querySignal handler may still |
|
239 |
decide to return something else." |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
240 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
241 |
^ UpdatingChanges |
1 | 242 |
! ! |
243 |
||
193 | 244 |
!Class class methodsFor:'enumeration '! |
245 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
246 |
allClassesInCategory:aCategory do:aBlock |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
247 |
"evaluate aBlock for all classes in aCategory; |
193 | 248 |
no specific order is defined." |
249 |
||
199 | 250 |
Smalltalk allBehaviorsDo:[:aClass | |
193 | 251 |
aClass isMeta ifFalse:[ |
252 |
(aClass category = aCategory) ifTrue:[ |
|
253 |
aBlock value:aClass |
|
254 |
] |
|
255 |
]. |
|
256 |
] |
|
257 |
||
258 |
" |
|
259 |
Class allClassesInCategory:'Kernel-Classes' |
|
260 |
do:[:class |Transcript showCr:class name] |
|
261 |
" |
|
262 |
! |
|
263 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
264 |
allClassesInCategory:aCategory inOrderDo:aBlock |
193 | 265 |
"evaluate aBlock for all classes in aCategory; |
266 |
superclasses come first - then subclasses." |
|
267 |
||
268 |
|classes| |
|
269 |
||
270 |
classes := OrderedCollection new. |
|
199 | 271 |
Smalltalk allBehaviorsDo:[:aClass | |
193 | 272 |
aClass isMeta ifFalse:[ |
273 |
(aClass category = aCategory) ifTrue:[ |
|
274 |
classes add:aClass |
|
275 |
] |
|
276 |
] |
|
277 |
]. |
|
278 |
classes topologicalSort:[:a :b | b isSubclassOf:a]. |
|
279 |
classes do:aBlock |
|
280 |
! ! |
|
281 |
||
620 | 282 |
!Class class methodsFor:'helpers'! |
283 |
||
284 |
revisionInfoFromString:aString |
|
285 |
"return a dictionary filled with revision info. |
|
740 | 286 |
This extracts the relevant info from aString. |
287 |
For now, this is a bad design - should always ask the |
|
288 |
SCM to extract the parts (knowing about the details of RCS headers |
|
289 |
here is a bad design ...)" |
|
620 | 290 |
|
689
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
291 |
|words info nm mgr| |
620 | 292 |
|
293 |
info := IdentityDictionary new. |
|
294 |
words := aString asCollectionOfWords. |
|
295 |
||
744
db7b733455b9
dont crash with bad revision strings (again)
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
296 |
words notEmpty ifTrue:[ |
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
297 |
"/ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
298 |
"/ supported formats: |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
299 |
"/ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
300 |
"/ $-Header: pathName rev date time user state $ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
301 |
"/ $-Revision: rev $ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
302 |
"/ $-Id: fileName rev date time user state $ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
303 |
"/ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
304 |
|
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
305 |
((words at:1) = '$Header:') ifTrue:[ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
306 |
nm := words at:2. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
307 |
info at:#repositoryPathName put:nm. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
308 |
(nm endsWith:',v') ifTrue:[ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
309 |
nm := nm copyWithoutLast:2 |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
310 |
]. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
311 |
info at:#fileName put:nm asFilename baseName. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
312 |
(words at:3) = '$' ifFalse:[ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
313 |
info at:#revision put:(words at:3). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
314 |
info at:#date put:(words at:4). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
315 |
info at:#time put:(words at:5). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
316 |
info at:#user put:(words at:6). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
317 |
info at:#state put:(words at:7). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
318 |
]. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
319 |
^ info |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
320 |
]. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
321 |
((words at:1) = '$Revision:') ifTrue:[ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
322 |
info at:#revision put:(words at:2). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
323 |
^ info |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
324 |
]. |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
325 |
((words at:1) = '$Id:') ifTrue:[ |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
326 |
info at:#fileName put:(words at:2). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
327 |
info at:#revision put:(words at:3). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
328 |
info at:#date put:(words at:4). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
329 |
info at:#time put:(words at:5). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
330 |
info at:#user put:(words at:6). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
331 |
info at:#state put:(words at:7). |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
332 |
^ info |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
333 |
]. |
620 | 334 |
]. |
335 |
||
336 |
"/ |
|
337 |
"/ mhmh - maybe its some other source code system |
|
338 |
"/ |
|
689
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
339 |
(mgr := Smalltalk at:SourceCodeManager) notNil ifTrue:[ |
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
340 |
^ mgr revisionInfoFromString:aString |
620 | 341 |
]. |
342 |
^ nil |
|
343 |
||
344 |
"Created: 15.11.1995 / 14:58:35 / cg" |
|
744
db7b733455b9
dont crash with bad revision strings (again)
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
345 |
"Modified: 13.12.1995 / 17:11:28 / cg" |
620 | 346 |
! ! |
347 |
||
1 | 348 |
!Class methodsFor:'ST/V subclass creation'! |
349 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
350 |
subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
37 | 351 |
"this method allows fileIn of ST/V classes |
1 | 352 |
(which seem to have no category)" |
353 |
||
354 |
^ self subclass:t |
|
153 | 355 |
instanceVariableNames:f |
356 |
classVariableNames:d |
|
357 |
poolDictionaries:s |
|
358 |
category:'ST/V classes' |
|
1 | 359 |
! |
360 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
361 |
variableByteSubclass:t classVariableNames:d poolDictionaries:s |
37 | 362 |
"this method allows fileIn of ST/V variable byte classes |
1 | 363 |
(which seem to have no category and no instvars)" |
364 |
||
365 |
^ self variableByteSubclass:t |
|
153 | 366 |
instanceVariableNames:'' |
367 |
classVariableNames:d |
|
368 |
poolDictionaries:s |
|
369 |
category:'ST/V classes' |
|
1 | 370 |
! |
371 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
372 |
variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
37 | 373 |
"this method allows fileIn of ST/V variable pointer classes |
1 | 374 |
(which seem to have no category)" |
375 |
||
376 |
^ self variableSubclass:t |
|
153 | 377 |
instanceVariableNames:f |
378 |
classVariableNames:d |
|
379 |
poolDictionaries:s |
|
380 |
category:'ST/V classes' |
|
1 | 381 |
! ! |
382 |
||
383 |
!Class methodsFor:'accessing'! |
|
384 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
385 |
addClassVarName:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
386 |
"add a class variable if not already there and initialize it with nil. |
555 | 387 |
Also writes a change record and notifies dependents. |
388 |
BUG: Currently, no recompilation is done - this will change." |
|
389 |
||
390 |
(self classVarNames includes:aString) ifFalse:[ |
|
391 |
self classVariableString:(self classVariableString , ' ' , aString). |
|
392 |
self addChangeRecordForClass:self. |
|
393 |
self changed:#definition. |
|
394 |
] |
|
395 |
||
396 |
"Created: 29.10.1995 / 19:40:51 / cg" |
|
397 |
! |
|
398 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
399 |
allClassVarNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
400 |
"return a collection of all the class variable name-strings |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
401 |
this includes all superclass-class variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
402 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
403 |
^ self addAllClassVarNamesTo:(OrderedCollection new) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
404 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
405 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
406 |
Float allClassVarNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
407 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
408 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
409 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
410 |
classFilename |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
411 |
"return the name of the file from which the class was compiled. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
412 |
This is currently NOT used." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
413 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
414 |
^ classFilename |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
415 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
416 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
417 |
classVarAt:aSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
418 |
"return the value of a class variable. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
419 |
Currently, this returns nil if there is no such classvar - |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
420 |
this may change." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
421 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
422 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
423 |
this hides the (current) implementation of classVariables |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
424 |
from the outside world. Currently, classvars are stored in |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
425 |
the Smalltalk dictionary with a funny name, since there are |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
426 |
no classPools yet. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
427 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
428 |
^ Smalltalk at:(self name , ':' , aSymbol) asSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
429 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
430 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
431 |
classVarAt:aSymbol put:something |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
432 |
"store something in a classvariable. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
433 |
Currently this creates a global with a funny name if no such |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
434 |
classVar exists - this may change." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
435 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
436 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
437 |
this hides the (current) implementation of classVariables |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
438 |
from the outside world. Currently, classvars are stored in |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
439 |
the Smalltalk dictionary with a funny name, since there are |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
440 |
no classPools yet. |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
441 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
442 |
Smalltalk at:(self name , ':' , aSymbol) asSymbol put:something. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
443 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
444 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
445 |
classVarNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
446 |
"return a collection of the class variable name-strings. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
447 |
Only names of class variables defined in this class are included |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
448 |
in the returned collection - use allClassVarNames, to get all known names." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
449 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
450 |
classvars isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
451 |
^ OrderedCollection new |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
452 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
453 |
^ classvars asCollectionOfWords |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
454 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
455 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
456 |
Object classVarNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
457 |
Float classVarNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
458 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
459 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
460 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
461 |
classVariableString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
462 |
"return a string of the class variables names. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
463 |
Only names of class variables defined in this class are in the |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
464 |
returned string." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
465 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
466 |
classvars isNil ifTrue:[^ '']. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
467 |
^ classvars |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
468 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
469 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
470 |
Object classVariableString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
471 |
Float classVariableString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
472 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
473 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
474 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
475 |
classVariableString:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
476 |
"set the classes classvarnames string; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
477 |
Initialize new class variables with nil, clear and remove old ones. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
478 |
No change record is written and no classes are recompiled." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
479 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
480 |
|prevVarNames varNames any| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
481 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
482 |
"ignore for metaclasses except the one" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
483 |
(self isMeta) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
484 |
(self == Metaclass) ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
485 |
^ self |
556 | 486 |
] |
487 |
]. |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
488 |
(classvars = aString) ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
489 |
prevVarNames := self classVarNames. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
490 |
classvars := aString. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
491 |
varNames := self classVarNames. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
492 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
493 |
"new ones get initialized to nil; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
494 |
- old ones are nilled and removed from Smalltalk" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
495 |
any := false. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
496 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
497 |
varNames do:[:aName | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
498 |
(prevVarNames includes:aName) ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
499 |
"a new one" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
500 |
self classVarAt:aName put:nil. |
453 | 501 |
any := true. |
502 |
] ifTrue:[ |
|
503 |
prevVarNames remove:aName |
|
504 |
] |
|
505 |
]. |
|
506 |
"left overs are gone" |
|
507 |
prevVarNames do:[:aName | |
|
508 |
self classVarAt:aName put:nil. |
|
509 |
Smalltalk removeKey:(self name , ':' , aName) asSymbol. |
|
510 |
]. |
|
511 |
any ifTrue:[ |
|
512 |
Smalltalk changed:#classVariables with:self |
|
513 |
]. |
|
514 |
] |
|
515 |
! |
|
516 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
517 |
comment |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
518 |
"return the comment (aString) of the class" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
519 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
520 |
|stream string| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
521 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
522 |
"the comment is either a string, or an integer specifying the |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
523 |
position within the classes sourcefile ... |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
524 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
525 |
comment isNumber ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
526 |
classFilename notNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
527 |
stream := self sourceStream. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
528 |
stream notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
529 |
stream position:comment. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
530 |
string := String readFrom:stream onError:''. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
531 |
stream close. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
532 |
^ string |
887
9d1780436f5a
use new metaclass entry when loading binary classes
Claus Gittinger <cg@exept.de>
parents:
881
diff
changeset
|
533 |
]. |
9d1780436f5a
use new metaclass entry when loading binary classes
Claus Gittinger <cg@exept.de>
parents:
881
diff
changeset
|
534 |
^ nil |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
535 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
536 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
537 |
^ comment |
555 | 538 |
|
539 |
" |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
540 |
Object comment |
555 | 541 |
" |
542 |
! |
|
543 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
544 |
comment:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
545 |
"set the comment of the class to be the argument, aString; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
546 |
create a change record and notify dependents." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
547 |
|
865
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
548 |
|oldComment newComment| |
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
549 |
|
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
550 |
newComment := aString. |
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
551 |
(aString notNil and:[aString isEmpty]) ifTrue:[ |
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
552 |
newComment := nil |
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
553 |
]. |
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
554 |
comment ~= newComment ifTrue:[ |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
555 |
oldComment := self comment. |
865
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
556 |
comment := newComment. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
557 |
self changed:#comment with:oldComment. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
558 |
self addChangeRecordForClassComment:self. |
555 | 559 |
] |
560 |
! |
|
561 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
562 |
definition |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
563 |
"return an expression-string to define myself" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
564 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
565 |
|s| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
566 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
567 |
s := WriteStream on:(String new). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
568 |
self fileOutDefinitionOn:s. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
569 |
^ s contents |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
570 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
571 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
572 |
Object definition |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
573 |
Point definition |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
574 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
575 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
576 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
577 |
history |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
578 |
"return the history of the class" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
579 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
580 |
^ history |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
581 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
582 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
583 |
Object history |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
584 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
585 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
586 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
587 |
history:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
588 |
"set the history of the class." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
589 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
590 |
history := aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
591 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
592 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
593 |
package |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
594 |
"return the package of the class" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
595 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
596 |
^ package |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
597 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
598 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
599 |
Object package |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
600 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
601 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
602 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
603 |
package:aStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
604 |
"set the package of the class." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
605 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
606 |
package := aStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
607 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
608 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
609 |
primitiveDefinitions:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
610 |
"set the primitiveDefinition string" |
555 | 611 |
|
612 |
self setPrimitiveSpecsAt:1 to:aString. |
|
613 |
self addChangeRecordForPrimitiveDefinitions:self. |
|
614 |
||
615 |
"Created: 29.10.1995 / 19:41:39 / cg" |
|
616 |
! |
|
617 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
618 |
primitiveDefinitionsString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
619 |
"return the primitiveDefinition string or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
620 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
621 |
^ self getPrimitiveSpecsAt:1 |
555 | 622 |
|
623 |
" |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
624 |
Object primitiveDefinitionsString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
625 |
String primitiveDefinitionsString |
555 | 626 |
" |
627 |
! |
|
628 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
629 |
primitiveFunctions:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
630 |
"set the primitiveFunction string" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
631 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
632 |
self setPrimitiveSpecsAt:3 to:aString. |
555 | 633 |
self addChangeRecordForPrimitiveFunctions:self. |
634 |
||
635 |
"Created: 29.10.1995 / 19:41:48 / cg" |
|
636 |
! |
|
637 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
638 |
primitiveFunctionsString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
639 |
"return the primitiveFunctions string or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
640 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
641 |
^ self getPrimitiveSpecsAt:3 |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
642 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
643 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
644 |
primitiveSpec |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
645 |
"return the primitiveSpec or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
646 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
647 |
^ primitiveSpec |
555 | 648 |
! |
649 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
650 |
primitiveSpec:anArrayOf3ElementsOrNil |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
651 |
"set the primitiveSpec or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
652 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
653 |
primitiveSpec := anArrayOf3ElementsOrNil |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
654 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
655 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
656 |
primitiveVariables:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
657 |
"set the primitiveVariable string" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
658 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
659 |
self setPrimitiveSpecsAt:2 to:aString. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
660 |
self addChangeRecordForPrimitiveVariables:self. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
661 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
662 |
"Created: 29.10.1995 / 19:41:58 / cg" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
663 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
664 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
665 |
primitiveVariablesString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
666 |
"return the primitiveVariables string or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
667 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
668 |
^ self getPrimitiveSpecsAt:2 |
555 | 669 |
! |
670 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
671 |
removeClassVarName:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
672 |
"remove a class variable if not already there. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
673 |
Also writes a change record and notifies dependents. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
674 |
BUG: Currently, no recompilation is done - this will change." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
675 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
676 |
|names newNames| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
677 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
678 |
names := self classVarNames. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
679 |
(names includes:aString) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
680 |
newNames := ''. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
681 |
names do:[:nm | nm ~= aString ifTrue:[newNames := newNames , nm , ' ']]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
682 |
self classVariableString:newNames withoutSpaces. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
683 |
self addChangeRecordForClass:self. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
684 |
self changed:#definition. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
685 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
686 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
687 |
"Created: 29.10.1995 / 19:42:08 / cg" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
688 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
689 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
690 |
renameCategory:oldCategory to:newCategory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
691 |
"rename a category (changes category of those methods). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
692 |
Appends a change record and notifies dependents." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
693 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
694 |
|any| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
695 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
696 |
any := false. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
697 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
698 |
aMethod category = oldCategory ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
699 |
aMethod category:newCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
700 |
any := true. |
555 | 701 |
] |
702 |
]. |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
703 |
any ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
704 |
self addChangeRecordForRenameCategory:oldCategory to:newCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
705 |
self changed:#methodCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
706 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
707 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
708 |
"Created: 29.10.1995 / 19:42:15 / cg" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
709 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
710 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
711 |
setClassFilename:aFilename |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
712 |
"set the classes filename. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
713 |
This is a dangerous (low level) operation, since the |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
714 |
comment and primitiveSpecs may no longer be accessable, if a wrong filename |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
715 |
is set here." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
716 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
717 |
classFilename := aFilename |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
718 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
719 |
"Modified: 8.9.1995 / 14:16:48 / claus" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
720 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
721 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
722 |
setClassVariableString:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
723 |
"set the classes classvarnames string. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
724 |
This is a dangerous (low level) operation, since the |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
725 |
classvariables are not really created or updated. Also, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
726 |
NO change record is written." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
727 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
728 |
classvars := aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
729 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
730 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
731 |
setComment:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
732 |
"set the comment of the class to be the argument, aString; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
733 |
do NOT create a change record" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
734 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
735 |
comment := aString |
1 | 736 |
! |
737 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
738 |
setComment:com category:categoryStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
739 |
"set the comment and category of the class; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
740 |
do NOT create a change record" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
741 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
742 |
|cat| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
743 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
744 |
comment := com. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
745 |
categoryStringOrSymbol isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
746 |
cat := '' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
747 |
] ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
748 |
cat := categoryStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
749 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
750 |
category := cat asSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
751 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
752 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
753 |
setHistory:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
754 |
"set the history of the class." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
755 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
756 |
history := aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
757 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
758 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
759 |
setPackage:aStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
760 |
"set the package of the class." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
761 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
762 |
package := aStringOrSymbol |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
763 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
764 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
765 |
sharedPools |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
766 |
"ST/X does not (currently) support pools" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
767 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
768 |
^ #() |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
769 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
770 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
771 |
source |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
772 |
"return the classes full source code" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
773 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
774 |
|code aStream| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
775 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
776 |
" this is too slow for big classes ... |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
777 |
code := String new:1000. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
778 |
aStream := WriteStream on:code. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
779 |
self fileOutOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
780 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
781 |
aStream := FileStream newFileNamed:'__temp'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
782 |
aStream isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
783 |
self notify:'cannot create temporary file.'. |
555 | 784 |
^ nil |
785 |
]. |
|
786 |
FileOutErrorSignal handle:[:ex | |
|
787 |
aStream nextPutAll:'"no source available"'. |
|
788 |
] do:[ |
|
789 |
self fileOutOn:aStream. |
|
790 |
]. |
|
791 |
aStream close. |
|
792 |
aStream := FileStream oldFileNamed:'__temp'. |
|
793 |
aStream isNil ifTrue:[ |
|
794 |
self notify:'oops - cannot reopen temp file'. |
|
795 |
^ nil |
|
796 |
]. |
|
797 |
code := aStream contents. |
|
798 |
aStream close. |
|
799 |
OperatingSystem removeFile:'__temp'. |
|
800 |
^ code |
|
385 | 801 |
! |
802 |
||
689
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
803 |
sourceCodeManager |
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
804 |
"return my source code manager. |
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
805 |
For now, all classes return the same global manager. |
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
806 |
But future versions may support mixed reporitories" |
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
807 |
|
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
808 |
AbstractSourceCodeManager notNil ifTrue:[ |
865
0cfc2bd91232
clear empty comments back to nil
Claus Gittinger <cg@exept.de>
parents:
858
diff
changeset
|
809 |
^ AbstractSourceCodeManager defaultManager |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
810 |
]. |
689
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
811 |
^ Smalltalk at:#SourceCodeManager |
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
812 |
|
d8f2044c6634
access SOurceCodeManager via a class-specific method
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
813 |
"Created: 7.12.1995 / 13:16:46 / cg" |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
814 |
"Modified: 16.12.1995 / 13:21:55 / cg" |
1 | 815 |
! ! |
816 |
||
817 |
!Class methodsFor:'adding/removing'! |
|
818 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
819 |
addSelector:newSelector withMethod:newMethod |
68 | 820 |
"add the method given by 2nd argument under the selector given by |
92 | 821 |
1st argument to the methodDictionary. |
153 | 822 |
Append a change record to the changes file and tell dependents." |
1 | 823 |
|
362 | 824 |
|oldMethod| |
825 |
||
826 |
CatchMethodRedefinitions ifTrue:[ |
|
827 |
"check for attempts to redefine a method |
|
828 |
in a different package. Signal a resumable error if so. |
|
829 |
This allows tracing redefinitions of existing system methods |
|
830 |
when filing in alien code .... |
|
831 |
(which we may want to forbit sometimes) |
|
832 |
" |
|
833 |
oldMethod := self compiledMethodAt:newSelector. |
|
834 |
oldMethod notNil ifTrue:[ |
|
835 |
oldMethod package ~= newMethod package ifTrue:[ |
|
836 |
" |
|
837 |
attempt to redefine an existing method, which was |
|
838 |
defined in another package. |
|
839 |
If you continue in the debugger, the new method gets installed. |
|
840 |
Otherwise, the existing (old) method remains valid. |
|
841 |
||
842 |
You can turn of the catching of redefinitions by setting |
|
843 |
CatchMethodRedefinitions to false |
|
844 |
(also found in the NewLaunchers 'settings-misc' menu) |
|
845 |
" |
|
406 | 846 |
MethodRedefinitionSignal |
847 |
raiseErrorString:(' ' , name , '>>' , newSelector) |
|
362 | 848 |
] |
849 |
] |
|
850 |
]. |
|
92 | 851 |
(super addSelector:newSelector withMethod:newMethod) ifTrue:[ |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
852 |
self addChangeRecordForMethod:newMethod. |
92 | 853 |
] |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
854 |
|
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
855 |
"Created: 29.10.1995 / 19:42:42 / cg" |
1 | 856 |
! |
857 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
858 |
removeSelector:aSelector |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
859 |
"remove the selector, aSelector and its associated method |
92 | 860 |
from the methodDictionary. |
153 | 861 |
Append a change record to the changes file and tell dependents." |
1 | 862 |
|
92 | 863 |
(super removeSelector:aSelector) ifTrue:[ |
153 | 864 |
self addChangeRecordForRemoveSelector:aSelector. |
865 |
self changed:#methodDictionary with:aSelector. |
|
1 | 866 |
] |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
867 |
|
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
868 |
"Created: 29.10.1995 / 19:42:47 / cg" |
216 | 869 |
! |
870 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
871 |
unload |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
872 |
"if the receiver was autoloaded, unload and reinstall it as |
293 | 873 |
autoloaded. Can be used to get rid of no longer needed autoloaded |
328 | 874 |
classes. |
875 |
(maybe, autoloaded classes should unload themselfes when no |
|
876 |
longer needed - for example, after some delay when the last instance |
|
877 |
is gone ...)" |
|
293 | 878 |
|
879 |
|nm| |
|
880 |
||
216 | 881 |
self wasAutoloaded ifFalse:[ |
882 |
||
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
883 |
" |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
884 |
can it be done ? |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
885 |
" |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
886 |
self methodArray do:[:aMethod | |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
887 |
aMethod source isNil ifTrue:[^false]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
888 |
aMethod hasPrimitiveCode ifTrue:[^ false]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
889 |
]. |
216 | 890 |
]. |
891 |
||
283 | 892 |
self allSubclassesDo:[:aClass | |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
893 |
aClass unload |
283 | 894 |
]. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
895 |
Transcript showCr:'unloading ' , name , ' ...'. |
283 | 896 |
|
359 | 897 |
Autoload removeClass:self. |
293 | 898 |
nm := name. |
899 |
Smalltalk at:nm put:nil. |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
900 |
"/ name := (nm , ' (leftover)') asSymbol. |
288 | 901 |
ObjectMemory flushInlineCaches. |
902 |
ObjectMemory flushMethodCache. |
|
293 | 903 |
Autoload addClass:nm inCategory:category. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
904 |
"/ category := #unloaded. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
905 |
Smalltalk flushCachedClasses. |
216 | 906 |
^ true |
907 |
||
908 |
" |
|
909 |
Clock open. |
|
910 |
Clock unload. |
|
911 |
ClockView unload. |
|
912 |
Clock open |
|
913 |
" |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
914 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
915 |
"Modified: 7.2.1996 / 15:05:39 / cg" |
1 | 916 |
! ! |
917 |
||
453 | 918 |
!Class methodsFor:'binary storage'! |
919 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
920 |
addGlobalsTo: globalDictionary manager: manager |
453 | 921 |
" |
922 |
classPool == nil ifFalse: [ |
|
923 |
classPool associationsDo: [:assoc| |
|
924 |
globalDictionary at: assoc put: self |
|
925 |
] |
|
926 |
] |
|
927 |
" |
|
928 |
! |
|
929 |
||
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
930 |
binaryClassDefinitionFrom:stream manager:manager |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
931 |
"retrieve a class as stored previously with |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
932 |
#storeBinaryClassOn:manager:" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
933 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
934 |
|superclassName name flags instvars classvars category classInstVars |
986 | 935 |
comment package nSel superclassSig |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
936 |
newClass superClass selectors methods cselectors cmethods| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
937 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
938 |
"/ the following order must correlate to |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
939 |
"/ the storing in #storeBinaryClassOn:manager: |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
940 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
941 |
"/ retrieve |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
942 |
"/ superclasses name, |
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
943 |
"/ superclasses signature |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
944 |
"/ name, |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
945 |
"/ typeSymbol, |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
946 |
"/ instVarNames |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
947 |
"/ classVarNames |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
948 |
"/ category |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
949 |
"/ classInstVarNames |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
950 |
"/ comment |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
951 |
"/ package |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
952 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
953 |
superclassName := manager nextObject. |
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
954 |
superclassSig := manager nextObject. |
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
955 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
956 |
superclassName notNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
957 |
superClass := Smalltalk at:superclassName ifAbsent:nil. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
958 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
959 |
superClass isNil ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
960 |
BinaryIOManager nonexistingClassSignal |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
961 |
raiseRequestWith:'non existent superclass (in binaryLoad)'. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
962 |
^ nil |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
963 |
]. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
964 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
965 |
"/ ('loading superclass: ' , superclassName ) printNL. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
966 |
superClass autoload. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
967 |
superClass := Smalltalk at:superclassName. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
968 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
969 |
superclassSig ~= superClass signature ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
970 |
BinaryIOManager changedInstLayoutSignal |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
971 |
raiseRequestWith:'incompatible superclass (in binaryLoad)'. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
972 |
^ nil |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
973 |
] |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
974 |
]. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
975 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
976 |
name := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
977 |
flags := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
978 |
instvars := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
979 |
instvars isNil ifTrue:[instvars := '']. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
980 |
classvars := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
981 |
classvars isNil ifTrue:[classvars := '']. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
982 |
category := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
983 |
classInstVars := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
984 |
classInstVars isNil ifTrue:[classInstVars := '']. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
985 |
comment := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
986 |
package := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
987 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
988 |
"/ 'got superName:' print. superclassName printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
989 |
"/ 'got name:' print. name printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
990 |
"/ 'got flags: ' print. flags printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
991 |
"/ 'got instvars: ' print. instvars printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
992 |
"/ 'got classvars: ' print. classvars printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
993 |
"/ 'got category: ' print. category printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
994 |
"/ 'got classInstvars: ' print. classInstVars printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
995 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
996 |
"/ ('create class: ' , name ) printNL. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
997 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
998 |
(superClass notNil or:[superclassName isNil]) ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
999 |
newClass := superClass class |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1000 |
name:name asSymbol |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1001 |
inEnvironment:Smalltalk |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1002 |
subclassOf:superClass |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1003 |
instanceVariableNames:instvars |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1004 |
variable:false |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1005 |
words:false |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1006 |
pointers:true |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1007 |
classVariableNames:classvars |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1008 |
poolDictionaries:'' |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1009 |
category:category |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1010 |
comment:comment |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1011 |
changed:false |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1012 |
classInstanceVariableNames:classInstVars. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1013 |
newClass flags:flags. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1014 |
]. |
453 | 1015 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1016 |
"/ retrieve |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1017 |
"/ number of class methods |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1018 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1019 |
cselectors := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1020 |
nSel := cselectors size. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1021 |
cmethods := Array new:nSel. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1022 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1023 |
"/ retrieve |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1024 |
"/ class methods |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1025 |
1 to:nSel do:[:i | |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1026 |
|m| |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1027 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1028 |
m := Method binaryFullDefinitionFrom:stream manager:manager. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1029 |
cmethods at:i put:m. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1030 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1031 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1032 |
"/ retrieve |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1033 |
"/ number of inst methods |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1034 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1035 |
selectors := manager nextObject. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1036 |
nSel := selectors size. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1037 |
methods := Array new:nSel. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1038 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1039 |
"/ retrieve |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1040 |
"/ inst methods |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1041 |
1 to:nSel do:[:i | |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1042 |
|m| |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1043 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1044 |
m := Method binaryFullDefinitionFrom:stream manager:manager. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1045 |
methods at:i put:m. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1046 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1047 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1048 |
(superClass isNil and:[superclassName notNil]) ifTrue:[^ nil]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1049 |
newClass isNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1050 |
^ nil |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1051 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1052 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1053 |
newClass package:package. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1054 |
newClass selectors:selectors methods:methods. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1055 |
newClass class selectors:cselectors methods:cmethods. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1056 |
^ newClass |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1057 |
|
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1058 |
"Modified: 8.2.1996 / 22:00:36 / cg" |
872 | 1059 |
! |
1060 |
||
1061 |
storeBinaryClassOn:stream manager:manager |
|
1062 |
"store a classes complete description (i.e. including methods). |
|
1063 |
However, the superclass chain is not stored - at load time, that must |
|
1064 |
be either present or autoloadable." |
|
1065 |
||
986 | 1066 |
|s selectors sig| |
872 | 1067 |
|
1068 |
stream nextPut: manager codeForClass. |
|
1069 |
||
1070 |
"/ the following order must correlate to |
|
1071 |
"/ the storing in #binaryDefinitionFrom:manager: |
|
1072 |
||
1073 |
"/ store |
|
1074 |
"/ superclasses name, |
|
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1075 |
"/ superclasses signature |
872 | 1076 |
"/ name, |
1077 |
"/ typeSymbol, |
|
1078 |
"/ instVarNames |
|
1079 |
"/ classVarNames |
|
1080 |
"/ category |
|
1081 |
"/ classInstVarNames |
|
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1082 |
"/ comment |
902
2e1c740a255f
also store the package in binaryClassStore
Claus Gittinger <cg@exept.de>
parents:
900
diff
changeset
|
1083 |
"/ package |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1084 |
|
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1085 |
superclass isNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1086 |
s := nil. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1087 |
sig := 0. |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1088 |
] ifFalse:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1089 |
s := superclass name. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1090 |
sig := superclass signature. |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1091 |
]. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1092 |
s storeBinaryOn:stream manager:manager. |
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1093 |
sig storeBinaryOn:stream manager:manager. |
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1094 |
|
872 | 1095 |
name storeBinaryOn:stream manager:manager. |
1096 |
flags storeBinaryOn:stream manager:manager. |
|
1097 |
(instvars notNil and:[instvars isEmpty]) ifTrue:[ |
|
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1098 |
s := nil |
872 | 1099 |
] ifFalse:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1100 |
s := instvars |
872 | 1101 |
]. |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1102 |
s storeBinaryOn:stream manager:manager. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1103 |
|
872 | 1104 |
(classvars notNil and:[classvars isEmpty]) ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1105 |
s := nil |
872 | 1106 |
] ifFalse:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1107 |
s := classvars |
872 | 1108 |
]. |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1109 |
s storeBinaryOn:stream manager:manager. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1110 |
|
872 | 1111 |
category storeBinaryOn:stream manager:manager. |
1112 |
s := self class instanceVariableString. |
|
1113 |
(s notNil and:[s isEmpty]) ifTrue:[ |
|
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1114 |
s := nil |
872 | 1115 |
]. |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1116 |
s storeBinaryOn:stream manager:manager. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1117 |
|
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1118 |
s := comment. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1119 |
manager sourceMode == #discard ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1120 |
s := nil |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1121 |
]. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1122 |
s storeBinaryOn:stream manager:manager. |
902
2e1c740a255f
also store the package in binaryClassStore
Claus Gittinger <cg@exept.de>
parents:
900
diff
changeset
|
1123 |
package storeBinaryOn:stream manager:manager. |
872 | 1124 |
|
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1125 |
|
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1126 |
"/ |
872 | 1127 |
"/ store |
1128 |
"/ number of class methods |
|
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1129 |
selectors := self class selectorArray copy. |
880 | 1130 |
selectors storeBinaryOn:stream manager:manager. |
872 | 1131 |
|
1132 |
"/ store |
|
1133 |
"/ class methods |
|
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1134 |
selectors do:[:sel | |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1135 |
|m m2| |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1136 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1137 |
m := self class compiledMethodAt:sel. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1138 |
m isLazyMethod ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1139 |
m2 := m makeRealMethod. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1140 |
m2 notNil ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1141 |
m := m2 |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1142 |
] ifFalse:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1143 |
('failed to compile: ' , m displayString) errorPrintNL |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1144 |
] |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1145 |
]. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1146 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1147 |
m storeFullBinaryDefinitionOn:stream manager:manager |
872 | 1148 |
]. |
1149 |
||
1150 |
"/ store |
|
1151 |
"/ number of inst methods |
|
880 | 1152 |
|
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1153 |
selectors := selectorArray copy. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1154 |
selectors storeBinaryOn:stream manager:manager. |
872 | 1155 |
|
1156 |
"/ store |
|
1157 |
"/ inst methods |
|
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1158 |
selectors do:[:sel | |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1159 |
|m| |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1160 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1161 |
m := self compiledMethodAt:sel. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1162 |
m isLazyMethod ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1163 |
m := m makeRealMethod |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1164 |
]. |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1165 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
1166 |
m storeFullBinaryDefinitionOn:stream manager:manager |
872 | 1167 |
]. |
1168 |
||
1169 |
" |
|
1170 |
|bos| |
|
1171 |
||
1172 |
bos := BinaryObjectStorage onNew: (Filename named: 'FBrowser.cls') writeStream. |
|
1173 |
bos nextPutClasses:(Array with:FileBrowser). |
|
1174 |
bos close. |
|
1175 |
" |
|
1176 |
" |
|
1177 |
|bos cls| |
|
1178 |
||
1179 |
bos := BinaryObjectStorage onOld: (Filename named: 'FBrowser.cls') readStream. |
|
1180 |
cls := bos next. |
|
1181 |
bos close. |
|
1182 |
cls open. |
|
1183 |
" |
|
1184 |
||
944
841e99b1a73a
check signature in binaryLoad of classes
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
1185 |
"Modified: 7.2.1996 / 20:03:31 / cg" |
872 | 1186 |
! |
1187 |
||
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1188 |
storeBinaryDefinitionOf: anAssociation on: stream manager: manager |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1189 |
"not usable at the moment - there are no classpools currently" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1190 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1191 |
| string | |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1192 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1193 |
string := self name, ' classPool at: ', anAssociation key storeString. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1194 |
stream nextNumber: 2 put: string size. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1195 |
string do: [:char| stream nextPut: char asciiValue] |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1196 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1197 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1198 |
storeBinaryDefinitionOn: stream manager: manager |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1199 |
"classes only store the name, signature and instvar names. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1200 |
They restore by looking for that name in the Smalltalk dictionary. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1201 |
However, using the signature, a check for being valid is made at |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1202 |
restore time. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1203 |
This avoids a full recursive store of a class in the normal binary |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1204 |
storage - however, it also means that a classes semantics cannot |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1205 |
be stored with the basic storeBinary operation |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1206 |
(we depend on the class being present at binaryLoad time. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1207 |
To store classes, use #storeBinaryClassOn:manager: or BOSS>>nextPutClasses:." |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1208 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1209 |
|varnames n sz| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1210 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1211 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1212 |
output the signature |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1213 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1214 |
stream nextNumber:4 put:self signature. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1215 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1216 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1217 |
output the instance variable name string |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1218 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1219 |
varnames := self allInstVarNames. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1220 |
n := varnames size. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1221 |
n == 0 ifTrue:[ |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1222 |
sz := 0 |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1223 |
] ifFalse:[ |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1224 |
sz := varnames inject:0 into:[:sum :nm | sum + nm size]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1225 |
sz := sz + n - 1. |
877
63ebb325ed20
flush global-access cache (using snapshotID) when saving a methods binary code
Claus Gittinger <cg@exept.de>
parents:
872
diff
changeset
|
1226 |
]. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1227 |
stream nextNumber:2 put:sz. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1228 |
varnames keysAndValuesDo:[:i :nm | |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1229 |
nm do:[:c | |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1230 |
stream nextPut:c asciiValue |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1231 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1232 |
i ~~ n ifTrue:[stream nextPut:(Character space asciiValue)] |
900
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1233 |
]. |
138ea0c188ee
also store comment; handle nil-subclasses
Claus Gittinger <cg@exept.de>
parents:
897
diff
changeset
|
1234 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1235 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1236 |
output my name |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1237 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1238 |
stream nextNumber:2 put:name size. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1239 |
name do:[:c| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1240 |
stream nextPut:c asciiValue |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1241 |
] |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1242 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1243 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1244 |
|s| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1245 |
s := WriteStream on:ByteArray new. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1246 |
Rectangle storeBinaryOn:s. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1247 |
Object readBinaryFrom:(ReadStream on:s contents) |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1248 |
" |
453 | 1249 |
! ! |
1250 |
||
1251 |
!Class methodsFor:'c function interfacing'! |
|
1252 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1253 |
cInterfaceFunction:selector calling:cFunctionNameString args:argTypeArray returning:returnType |
453 | 1254 |
"create an interface to an existing (i.e. already linked in) c function. |
1255 |
The function can be called by sending selector to the receiver class. |
|
1256 |
The c-function has the name cFunctionNameString, and expects parameters as specified in |
|
1257 |
argTypeArray. The functions return value has a type as specified by returnType. |
|
1258 |
WARNING: |
|
1259 |
this interface is EXPERIMENTAL - it may change or even be removed." |
|
1260 |
||
1261 |
StubGenerator isNil ifTrue:[ |
|
1262 |
^ self error:'this system does not support dynamic C Interface functions'. |
|
1263 |
]. |
|
1264 |
||
1265 |
StubGenerator |
|
1266 |
createStubFor:selector |
|
1267 |
calling:cFunctionNameString |
|
1268 |
args:argTypeArray |
|
1269 |
returning:returnType |
|
1270 |
in:self |
|
1271 |
||
1272 |
" |
|
1273 |
Object subclass:#CInterface |
|
1274 |
instanceVariableNames:'' |
|
1275 |
classVariableNames:'' |
|
1276 |
poolDictionaries:'' |
|
1277 |
category:'Examples'. |
|
1278 |
||
1279 |
CInterface cInterfaceFunction:#printfOn:format:withFloat: |
|
1280 |
calling:'fprintf' |
|
1281 |
args:#(ExternalStream String Float) |
|
1282 |
returning:#SmallInteger. |
|
1283 |
||
1284 |
CInterface printfOn:Stdout format:'this is a float: %g' withFloat:(Float pi). Stdout cr |
|
1285 |
" |
|
1286 |
! ! |
|
1287 |
||
1 | 1288 |
!Class methodsFor:'changes management'! |
1289 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1290 |
addChangeRecordForChangeCategory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1291 |
"add a category change record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1292 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1293 |
self writingChangePerform:#addChangeRecordForChangeCategory:to: with:category. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1294 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1295 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1296 |
addChangeRecordForClass:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1297 |
"add a class-definition-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1298 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1299 |
self writingChangePerform:#addChangeRecordForClass:to: with:aClass. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1300 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1301 |
|
620 | 1302 |
addChangeRecordForClassCheckIn:aClass |
1303 |
"append a class-was-checkedIn-record to the changes file" |
|
1304 |
||
708
ba92b2a8477d
include classes checkin revision in checkin-change-record
Claus Gittinger <cg@exept.de>
parents:
707
diff
changeset
|
1305 |
self addInfoRecord:('checkin ' , aClass name , ' (' , aClass revision , ')') |
620 | 1306 |
|
1307 |
"Created: 18.11.1995 / 17:04:58 / cg" |
|
708
ba92b2a8477d
include classes checkin revision in checkin-change-record
Claus Gittinger <cg@exept.de>
parents:
707
diff
changeset
|
1308 |
"Modified: 7.12.1995 / 23:45:01 / cg" |
620 | 1309 |
! |
1310 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1311 |
addChangeRecordForClassComment:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1312 |
"add a class-comment-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1313 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1314 |
self writingChangePerform:#addChangeRecordForClassComment:to: with:aClass. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1315 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1316 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1317 |
addChangeRecordForClassFileOut:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1318 |
"append a class-was-filedOut-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1319 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1320 |
self addInfoRecord:('fileOut ' , aClass name) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1321 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1322 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1323 |
addChangeRecordForClassInstvars:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1324 |
"add a class-instvars-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1325 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1326 |
self writingChangePerform:#addChangeRecordForClassInstvars:to: with:aClass. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1327 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1328 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1329 |
addChangeRecordForClassRemove:oldName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1330 |
"add a class-remove-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1331 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1332 |
self writingChangePerform:#addChangeRecordForClassRemove:to: with:oldName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1333 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1334 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1335 |
addChangeRecordForClassRename:oldName to:newName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1336 |
"add a class-rename-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1337 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1338 |
self writingChangeDo:[:aStream | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1339 |
self addChangeRecordForClassRename:oldName to:newName to:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1340 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1341 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1342 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1343 |
addChangeRecordForMethod:aMethod |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1344 |
"add a method-change-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1345 |
|
858 | 1346 |
self askIfUpdatingChanges ifTrue:[ |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1347 |
self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1348 |
"this test allows a smalltalk without Projects/ChangeSets" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1349 |
Project notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1350 |
Project addMethodChange:aMethod in:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1351 |
] |
555 | 1352 |
] |
1353 |
! |
|
1354 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1355 |
addChangeRecordForMethodCategory:aMethod category:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1356 |
"add a methodCategory-change-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1357 |
|
858 | 1358 |
self askIfUpdatingChanges ifTrue:[ |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1359 |
self writingChangeDo:[:aStream | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1360 |
self addChangeRecordForMethodCategory:aMethod category:aString to:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1361 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1362 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1363 |
"this test allows a smalltalk without Projects/ChangeSets" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1364 |
Project notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1365 |
Project addMethodCategoryChange:aMethod category:aString in:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1366 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1367 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1368 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1369 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1370 |
addChangeRecordForMethodPrivacy:aMethod |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1371 |
"add a method-privacy-change-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1372 |
|
858 | 1373 |
self askIfUpdatingChanges ifTrue:[ |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1374 |
self writingChangePerform:#addChangeRecordForMethodPrivacy:to: with:aMethod. |
555 | 1375 |
"this test allows a smalltalk without Projects/ChangeSets" |
1376 |
Project notNil ifTrue:[ |
|
1377 |
Project addMethodPrivacyChange:aMethod in:self |
|
1378 |
] |
|
1379 |
] |
|
1380 |
||
1381 |
"Modified: 27.8.1995 / 22:47:32 / claus" |
|
1382 |
! |
|
1383 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1384 |
addChangeRecordForPrimitiveDefinitions:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1385 |
"add a primitiveDefinitions-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1386 |
|
858 | 1387 |
self askIfUpdatingChanges ifTrue:[ |
669
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1388 |
self writingChangePerform:#addChangeRecordForPrimitiveDefinitions:to: with:aClass. |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1389 |
Project notNil ifTrue:[ |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1390 |
Project addPrimitiveDefinitionsChangeFor:aClass |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1391 |
] |
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
663
diff
changeset
|
1392 |
] |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1393 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1394 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1395 |
addChangeRecordForPrimitiveFunctions:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1396 |
"add a primitiveFunctions-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1397 |
|
858 | 1398 |
self askIfUpdatingChanges ifTrue:[ |
669
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1399 |
self writingChangePerform:#addChangeRecordForPrimitiveFunctions:to: with:aClass. |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1400 |
Project notNil ifTrue:[ |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1401 |
Project addPrimitiveFunctionsChangeFor:aClass |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1402 |
] |
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
663
diff
changeset
|
1403 |
] |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1404 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1405 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1406 |
addChangeRecordForPrimitiveVariables:aClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1407 |
"add a primitiveVariables-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1408 |
|
858 | 1409 |
self askIfUpdatingChanges ifTrue:[ |
669
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1410 |
self writingChangePerform:#addChangeRecordForPrimitiveVariables:to: with:aClass. |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1411 |
Project notNil ifTrue:[ |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1412 |
Project addPrimitiveVariablesChangeFor:aClass |
62784300daa6
oops - dont add primitive-change-records if not updating changes
Claus Gittinger <cg@exept.de>
parents:
667
diff
changeset
|
1413 |
] |
666
6d4175de8c55
fixed primitiveDefinitions changes
Claus Gittinger <cg@exept.de>
parents:
663
diff
changeset
|
1414 |
] |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1415 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1416 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1417 |
addChangeRecordForRemoveSelector:aSelector |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1418 |
"add a method-remove-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1419 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1420 |
self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1421 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1422 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1423 |
addChangeRecordForRenameCategory:oldCategory to:newCategory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1424 |
"add a category-rename record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1425 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1426 |
self writingChangeDo:[:aStream | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1427 |
self addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream. |
555 | 1428 |
] |
1429 |
! |
|
1430 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1431 |
addChangeRecordForSnapshot:aFileName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1432 |
"add a snapshot-record to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1433 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1434 |
self addInfoRecord:('snapshot ' , aFileName) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1435 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1436 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1437 |
addChangeRecordForSnapshot:aFileName to:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1438 |
"add a snapshot-record to aStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1439 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1440 |
self addInfoRecord:('snapshot ' , aFileName) to:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1441 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1442 |
|
620 | 1443 |
addChangeTimeStampTo:aStream |
1444 |
"a timestamp - prepended to any change, except infoRecords" |
|
1445 |
||
1446 |
|info| |
|
1447 |
||
1448 |
info := 'timestamp ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName. |
|
1449 |
self addInfoRecord:info to:aStream. aStream cr. |
|
1450 |
||
1451 |
"Created: 18.11.1995 / 15:41:01 / cg" |
|
1452 |
! |
|
1453 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1454 |
addInfoRecord:aMessage |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1455 |
"add an info-record (snapshot, class fileOut etc.) to the changes file" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1456 |
|
576
b9f067c9814c
change record for checkin; timestamp changes
Claus Gittinger <cg@exept.de>
parents:
562
diff
changeset
|
1457 |
self writingChangeWithTimeStamp:false perform:#addInfoRecord:to: with:aMessage. |
b9f067c9814c
change record for checkin; timestamp changes
Claus Gittinger <cg@exept.de>
parents:
562
diff
changeset
|
1458 |
|
b9f067c9814c
change record for checkin; timestamp changes
Claus Gittinger <cg@exept.de>
parents:
562
diff
changeset
|
1459 |
"Modified: 18.11.1995 / 15:45:10 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1460 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1461 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1462 |
changesStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1463 |
"return a Stream for the writing changes file - or nil if no update is wanted" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1464 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1465 |
|streamType aStream fileName| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1466 |
|
858 | 1467 |
self askIfUpdatingChanges ifTrue:[ |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1468 |
fileName := ObjectMemory nameForChanges. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1469 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1470 |
LockChangesFile ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1471 |
streamType := LockedFileStream. |
488
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
1472 |
] ifFalse:[ |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
1473 |
streamType := FileStream. |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
1474 |
]. |
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
1475 |
aStream := streamType oldFileNamed:fileName. |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1476 |
aStream isNil ifTrue:[ |
488
1677ee52d630
hooks for change-file-locking. Experimental
Claus Gittinger <cg@exept.de>
parents:
484
diff
changeset
|
1477 |
aStream := streamType newFileNamed:fileName. |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1478 |
aStream isNil ifTrue:[ |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1479 |
self warn:'cannot create/update the changes file'. |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1480 |
^ nil |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1481 |
] |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1482 |
]. |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
1483 |
aStream setToEnd |
92 | 1484 |
]. |
1485 |
^ aStream |
|
453 | 1486 |
|
1487 |
"Created: 28.10.1995 / 16:53:43 / cg" |
|
1488 |
"Modified: 28.10.1995 / 16:55:03 / cg" |
|
92 | 1489 |
! |
1490 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1491 |
sourcesStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1492 |
"return a stream for writing the sources file. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1493 |
Notice, in ST/X, it is noncommon to use a single |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1494 |
source file; typically each classes source is kept |
555 | 1495 |
in a separate file." |
1496 |
||
1497 |
|aStream fileName| |
|
1498 |
||
1499 |
fileName := ObjectMemory nameForSources. |
|
1500 |
aStream := FileStream oldFileNamed:fileName. |
|
1501 |
aStream isNil ifTrue:[ |
|
1502 |
aStream := FileStream newFileNamed:fileName. |
|
1503 |
aStream isNil ifTrue:[ |
|
1504 |
Transcript showCr:'cannot update sources file'. |
|
1505 |
^ nil |
|
1506 |
] |
|
1507 |
]. |
|
1508 |
aStream setToEnd. |
|
1509 |
^ aStream |
|
1510 |
||
1511 |
"Created: 28.10.1995 / 16:53:17 / cg" |
|
1512 |
! |
|
1513 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1514 |
withoutUpdatingChangesDo:aBlock |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1515 |
"turn off change file update while evaluating aBlock. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1516 |
This method makes sure, that the update-flag is correctly restored |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1517 |
in case of an abort or other error." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1518 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1519 |
UpdateChangeFileQuerySignal handle:[:ex | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1520 |
ex proceedWith:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1521 |
] do:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1522 |
aBlock value |
555 | 1523 |
]. |
1 | 1524 |
! ! |
1525 |
||
1526 |
!Class methodsFor:'compiling'! |
|
1527 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1528 |
compile:code |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1529 |
"compile code, aString for this class; |
742 | 1530 |
if successful update the method dictionary. |
1531 |
Returns the new method or nil (on failure)." |
|
1532 |
||
1533 |
^ self compilerClass |
|
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1534 |
compile:code |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1535 |
forClass:self |
742 | 1536 |
|
1537 |
"Modified: 13.12.1995 / 10:56:00 / cg" |
|
328 | 1538 |
! |
1539 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1540 |
compile:code classified:category |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1541 |
"compile code, aString for this class; |
671 | 1542 |
if successful update the method dictionary. |
742 | 1543 |
The method is classified under category. |
1544 |
Returns the new method or nil (on failure)." |
|
1545 |
||
1546 |
^ self compilerClass |
|
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1547 |
compile:code |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1548 |
forClass:self |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1549 |
inCategory:category |
742 | 1550 |
|
1551 |
"Modified: 13.12.1995 / 11:02:34 / cg" |
|
1 | 1552 |
! |
1553 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1554 |
compile:code notifying:requestor |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1555 |
"compile code, aString for this class; on any error, notify |
742 | 1556 |
requestor, anObject with the error reason. |
1557 |
Returns the new method or nil (on failure)." |
|
1558 |
||
1559 |
^ self compilerClass |
|
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1560 |
compile:code |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1561 |
forClass:self |
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
1562 |
notifying:requestor |
742 | 1563 |
|
1564 |
"Modified: 13.12.1995 / 11:02:40 / cg" |
|
1 | 1565 |
! |
1566 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1567 |
recompile |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1568 |
"recompile all methods |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1569 |
used when a class changes instances and therefore all methods |
555 | 1570 |
have to be recompiled" |
2 | 1571 |
|
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
1572 |
selectorArray copy do:[:aSelector | |
555 | 1573 |
self recompile:aSelector |
2 | 1574 |
] |
1575 |
! |
|
1576 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1577 |
recompile:aSelector |
1 | 1578 |
"recompile the method associated with the argument, aSelector; |
1579 |
used when a superclass changes instances and we have to recompile |
|
1580 |
subclasses" |
|
1581 |
||
199 | 1582 |
|cat code| |
1 | 1583 |
|
199 | 1584 |
Class withoutUpdatingChangesDo:[ |
978 | 1585 |
MethodRedefinitionSignal ignoreIn:[ |
1586 |
cat := (self compiledMethodAt:aSelector) category. |
|
1587 |
code := self sourceCodeAt:aSelector. |
|
1588 |
self compilerClass compile:code forClass:self inCategory:cat |
|
1589 |
] |
|
2 | 1590 |
] |
978 | 1591 |
|
1592 |
"Modified: 20.2.1996 / 20:23:21 / cg" |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1593 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1594 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1595 |
recompileAll |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1596 |
"recompile this class and all subclasses" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1597 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1598 |
|classes| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1599 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1600 |
classes := self subclasses. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1601 |
self recompile. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1602 |
classes do:[:aClass | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1603 |
aClass recompileAll |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1604 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1605 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1606 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1607 |
recompileInvalidatedMethods:trap |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1608 |
"recompile all invalidated methods" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1609 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1610 |
|trapCode trapByteCode| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1611 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1612 |
trapCode := trap code. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1613 |
trapByteCode := trap byteCode. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1614 |
|
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
1615 |
selectorArray copy do:[:aSelector | |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1616 |
|m| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1617 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1618 |
m := self compiledMethodAt:aSelector. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1619 |
((m code = trapCode) and:[m byteCode == trapByteCode]) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1620 |
self recompile:aSelector |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1621 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1622 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1623 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1624 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1625 |
recompileMethodsAccessingAny:setOfNames |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1626 |
"recompile all methods accessing a variable from setOfNames" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1627 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1628 |
self recompileMethodsAccessingAny:setOfNames orSuper:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1629 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1630 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1631 |
recompileMethodsAccessingAny:setOfNames orSuper:superBoolean |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1632 |
"recompile all methods accessing a variable from setOfNames, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1633 |
or super (if superBoolean is true)" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1634 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1635 |
|p| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1636 |
|
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
1637 |
selectorArray copy do:[:aSelector | |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1638 |
|m| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1639 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1640 |
m := self compiledMethodAt:aSelector. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1641 |
p := Parser parseMethod:(m source) in:self. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1642 |
(p isNil |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1643 |
or:[(p usedVars notNil and:[p usedVars includesAny:setOfNames]) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1644 |
or:[superBoolean and:[p usesSuper]]]) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1645 |
self recompile:aSelector |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1646 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1647 |
] |
1 | 1648 |
! ! |
1649 |
||
1650 |
!Class methodsFor:'fileIn interface'! |
|
1651 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1652 |
ignoredMethodsFor:aCategory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1653 |
"this is a speciality of ST/X - it allows quick commenting of methods |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1654 |
from a source-file by replacing the 'methodsFor:' by 'ignoredMethodsFor:'. |
555 | 1655 |
Returns a ClassCategoryReader to read in and skip methods." |
1656 |
||
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1657 |
^ (self methodsFor:aCategory) ignoredProtocol |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1658 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1659 |
"Modified: 10.2.1996 / 12:53:25 / cg" |
555 | 1660 |
! |
1661 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1662 |
methods |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1663 |
"this method allows fileIn of ST/V methods - |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1664 |
return a ClassCategoryReader to read in and compile methods for me. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1665 |
Since ST/V does not support method categories, the loaded methods are |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1666 |
categorized as 'ST/V methods'." |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1667 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1668 |
^ ClassCategoryReader class:self category:'ST/V methods' |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1669 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1670 |
"Modified: 10.2.1996 / 12:44:21 / cg" |
555 | 1671 |
! |
1672 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1673 |
methodsFor:aCategory |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1674 |
"return a ClassCategoryReader to read in and compile methods for me." |
1 | 1675 |
|
1676 |
^ ClassCategoryReader class:self category:aCategory |
|
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1677 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1678 |
"Modified: 10.2.1996 / 12:44:43 / cg" |
1 | 1679 |
! |
1680 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1681 |
methodsForUndefined:categoryString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1682 |
"ST-80 compatibility. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1683 |
I dont yet know what this does - it was encountered by some tester. |
555 | 1684 |
For now, simply forward it." |
1685 |
||
1686 |
^ self methodsFor:categoryString |
|
1687 |
! |
|
1688 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1689 |
primitiveDefinitions |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1690 |
"this method allows fileIn of classes with primitive code. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1691 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1692 |
It returns a CCReader which reads the next chunks and installs the |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1693 |
unprocessed contents in the classes primitiveDefinitions section. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1694 |
Thus, although the definitions are NOT processed, they are still visible, |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1695 |
editable and especially: not lost when filing out the class." |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1696 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1697 |
^ ClassCategoryReader class:self primitiveSpec:#primitiveDefinitions: |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1698 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1699 |
"Modified: 10.2.1996 / 12:47:12 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1700 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1701 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1702 |
primitiveFunctions |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1703 |
"this method allows fileIn of classes with primitive code. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1704 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1705 |
It returns a CCReader which reads the next chunks and installs the |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1706 |
unprocessed contents in the classes primitiveFunctions section. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1707 |
Thus, although the functions are NOT processed, they are still visible, |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1708 |
editable and especially: not lost when filing out the class." |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1709 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1710 |
^ ClassCategoryReader class:self primitiveSpec:#primitiveFunctions: |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1711 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1712 |
"Modified: 10.2.1996 / 12:47:07 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1713 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1714 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1715 |
primitiveVariables |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1716 |
"this method allows fileIn of classes with primitive code. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1717 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1718 |
It returns a CCReader which reads the next chunks and installs the |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1719 |
unprocessed contents in the classes primitiveVariables section. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1720 |
Thus, although the variables are NOT processed, they are still visible, |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1721 |
editable and especially: not lost when filing out the class." |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1722 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1723 |
^ ClassCategoryReader class:self primitiveSpec:#primitiveVariables: |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1724 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1725 |
"Modified: 10.2.1996 / 12:47:28 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1726 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1727 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1728 |
privateMethodsFor:aCategory |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1729 |
"this method allows fileIn of ENVY and ST/X private methods. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1730 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1731 |
The following methods are only allowed to be executed if sent from a method |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1732 |
within the current class. Subclass sends or out-of-class sends will raise |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1733 |
a privatMethodError exception." |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1734 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1735 |
^ (self methodsFor:aCategory) privateProtocol |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1736 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1737 |
"Modified: 10.2.1996 / 12:48:44 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1738 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1739 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1740 |
protectedMethodsFor:aCategory |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1741 |
"this method allows fileIn of ENVY and ST/X protected methods. |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1742 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1743 |
The following methods are only allowed to be executed if sent from a method |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1744 |
within the current class or a subclass. Out-of-class sends will raise |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1745 |
a privatMethodError exception." |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1746 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1747 |
^ (self methodsFor:aCategory) protectedProtocol |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1748 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1749 |
"Modified: 10.2.1996 / 12:49:18 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1750 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1751 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1752 |
publicMethodsFor:aCategory |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1753 |
"this method allows fileIn of ENVY methods |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1754 |
The publicMethods keyword is for documentation only; my default, methods |
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1755 |
are public anyway (for backward compatibility)." |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1756 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1757 |
^ self methodsFor:aCategory |
958
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1758 |
|
50ae31c8deca
commentary & correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents:
956
diff
changeset
|
1759 |
"Modified: 10.2.1996 / 12:50:11 / cg" |
1 | 1760 |
! ! |
1761 |
||
1762 |
!Class methodsFor:'fileOut'! |
|
1763 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1764 |
basicFileOutDefinitionOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1765 |
"append an expression on aStream, which defines myself." |
238 | 1766 |
|
293 | 1767 |
|isVar line s| |
1 | 1768 |
|
68 | 1769 |
"take care of nil-superclass" |
1 | 1770 |
superclass isNil ifTrue:[ |
738 | 1771 |
line := 'nil' |
1 | 1772 |
] ifFalse:[ |
738 | 1773 |
line := (superclass name) |
1 | 1774 |
]. |
1775 |
superclass isNil ifTrue:[ |
|
738 | 1776 |
isVar := self isVariable |
1 | 1777 |
] ifFalse:[ |
738 | 1778 |
"I cant remember what this is for ?" |
1779 |
isVar := (self isVariable and:[superclass isVariable not]) |
|
1 | 1780 |
]. |
293 | 1781 |
|
1 | 1782 |
isVar ifTrue:[ |
738 | 1783 |
self isBytes ifTrue:[ |
1784 |
s := ' variableByteSubclass:#' |
|
1785 |
] ifFalse:[ |
|
1786 |
self isWords ifTrue:[ |
|
1787 |
s := ' variableWordSubclass:#' |
|
1788 |
] ifFalse:[ |
|
1789 |
self isLongs ifTrue:[ |
|
1790 |
s := ' variableLongSubclass:#' |
|
1791 |
] ifFalse:[ |
|
1792 |
self isFloats ifTrue:[ |
|
1793 |
s := ' variableFloatSubclass:#' |
|
1794 |
] ifFalse:[ |
|
1795 |
self isDoubles ifTrue:[ |
|
1796 |
s := ' variableDoubleSubclass:#' |
|
1797 |
] ifFalse:[ |
|
1798 |
s := ' variableSubclass:#' |
|
1799 |
] |
|
1800 |
] |
|
1801 |
] |
|
1802 |
] |
|
1803 |
] |
|
1 | 1804 |
] ifFalse:[ |
738 | 1805 |
s := ' subclass:#' |
1 | 1806 |
]. |
293 | 1807 |
line := line , s , name. |
1 | 1808 |
aStream nextPutAll:line. |
1809 |
||
345 | 1810 |
aStream crtab. |
738 | 1811 |
aStream nextPutAll:'instanceVariableNames:'''. |
1 | 1812 |
self printInstVarNamesOn:aStream indent:16. |
1813 |
aStream nextPutAll:''''. |
|
1814 |
||
345 | 1815 |
aStream crtab. |
738 | 1816 |
aStream nextPutAll:'classVariableNames:'''. |
1 | 1817 |
self printClassVarNamesOn:aStream indent:16. |
1818 |
aStream nextPutAll:''''. |
|
1819 |
||
345 | 1820 |
aStream crtab. |
738 | 1821 |
aStream nextPutAll:'poolDictionaries:'''''. |
1 | 1822 |
|
345 | 1823 |
aStream crtab. |
738 | 1824 |
aStream nextPutAll:'category:'. |
1 | 1825 |
category isNil ifTrue:[ |
738 | 1826 |
s := '''''' |
1 | 1827 |
] ifFalse:[ |
738 | 1828 |
s := category asString storeString |
1 | 1829 |
]. |
333 | 1830 |
aStream nextPutAll:s. |
1 | 1831 |
aStream cr |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
1832 |
|
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
1833 |
"Modified: 10.12.1995 / 16:31:50 / cg" |
1 | 1834 |
! |
1835 |
||
880 | 1836 |
binaryFileOut |
894
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1837 |
"create a file 'class.cls' consisting of all methods in myself |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1838 |
in a portable binary format. The methods source is saved by reference |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1839 |
to the classes sourceFile if there is any. |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1840 |
That sourcefile needs to be present after reload in order to be |
895 | 1841 |
browsable." |
894
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1842 |
|
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1843 |
self binaryFileOutWithSourceMode:#reference |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1844 |
! |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1845 |
|
880 | 1846 |
binaryFileOutOn:aStream |
894
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1847 |
"append a binary representation of myself to aStream" |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1848 |
|
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1849 |
self binaryFileOutOn:aStream sourceMode:#reference |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1850 |
! |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1851 |
|
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1852 |
binaryFileOutOn:aStream sourceMode:sourceMode |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1853 |
"append a binary representation of myself to aStream in |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1854 |
a portable binary format. |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1855 |
The argument controls how sources are to be saved: |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1856 |
#keep - include the source |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1857 |
#reference - include a reference to the sourceFile |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1858 |
#discard - dont save sources. |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1859 |
|
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1860 |
With #reference, the sourceFile needs to be present after reload |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1861 |
in order to be browsable." |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1862 |
|
880 | 1863 |
|bos| |
1864 |
||
1865 |
bos := BinaryObjectStorage onNew:aStream. |
|
894
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1866 |
bos sourceMode:sourceMode. |
880 | 1867 |
bos nextPutClasses:(Array with:self). |
1868 |
bos close. |
|
1869 |
! |
|
1870 |
||
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1871 |
binaryFileOutWithSourceMode:sourceMode |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1872 |
"create a file 'class.cls' consisting of all methods in myself |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1873 |
in a portable binary format. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1874 |
The argument controls how sources are to be saved: |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1875 |
#keep - include the source |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1876 |
#reference - include a reference to the sourceFile |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1877 |
#discard - dont save sources. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1878 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1879 |
With #reference, the sourceFile needs to be present after reload |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1880 |
in order to be browsable." |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1881 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1882 |
|baseName fileName aStream| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1883 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1884 |
baseName := (Smalltalk fileNameForClass:self name). |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1885 |
fileName := baseName , '.cls'. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1886 |
aStream := FileStream newFileNamed:fileName. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1887 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1888 |
aStream binary. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1889 |
self binaryFileOutOn:aStream sourceMode:sourceMode. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1890 |
aStream close. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1891 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
1892 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1893 |
fileOut |
894
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1894 |
"create a file 'class.st' consisting of all methods in myself in |
138c21732ab9
more on binary class storage (sourceMode argument)
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
1895 |
sourceForm, from which the class can be reconstructed (by filing in). |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1896 |
If the current project is not nil, create the file in the projects |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1897 |
directory. Care is taken, to not clobber any existing file in |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1898 |
case of errors (for example: disk full). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1899 |
Also, since the classes methods need a valid sourcefile, the current |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1900 |
sourceFile may not be rewritten." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1901 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1902 |
|aStream baseName dirName fileName newFileName needRename |
1107
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1903 |
mySourceFileName sameFile s mySourceFileID anySourceRef| |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1904 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1905 |
baseName := (Smalltalk fileNameForClass:self name). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1906 |
fileName := baseName , '.st'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1907 |
|
139 | 1908 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1909 |
this test allows a smalltalk to be built without Projects/ChangeSets |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1910 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1911 |
Project notNil ifTrue:[ |
967 | 1912 |
dirName := Project currentProjectDirectory |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1913 |
] ifFalse:[ |
967 | 1914 |
dirName := '' |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1915 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1916 |
fileName := dirName , fileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1917 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1918 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1919 |
if file exists, copy the existing to a .sav-file, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1920 |
create the new file as XXX.new-file, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1921 |
and, if that worked rename afterwards ... |
153 | 1922 |
" |
967 | 1923 |
(fileName asFilename exists) ifTrue:[ |
1107
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1924 |
sameFile := false. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1925 |
|
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1926 |
"/ check carefully - maybe, my source does not really come from that |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1927 |
"/ file (i.e. all of my methods have their source as string) |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1928 |
|
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1929 |
anySourceRef := false. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1930 |
methodArray do:[:m| |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1931 |
m sourcePosition notNil ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1932 |
anySourceRef := true |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1933 |
] |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1934 |
]. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1935 |
self class methodArray do:[:m| |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1936 |
m sourcePosition notNil ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1937 |
anySourceRef := true |
967 | 1938 |
] |
1939 |
]. |
|
1107
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1940 |
|
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1941 |
anySourceRef ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1942 |
s := self sourceStream. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1943 |
s notNil ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1944 |
mySourceFileID := s pathName asFilename info at:#id. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1945 |
sameFile := (fileName asFilename info at:#id) == mySourceFileID. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1946 |
s close. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1947 |
] ifFalse:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1948 |
classFilename notNil ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1949 |
" |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1950 |
check for overwriting my current source file |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1951 |
this is not allowed, since it would clobber my methods source |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1952 |
file ... you have to save it to some other place. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1953 |
This happens if you ask for a fileOut into the source-directory |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1954 |
(from which my methods get their source) |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1955 |
" |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1956 |
mySourceFileName := Smalltalk getSourceFileName:classFilename. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1957 |
sameFile := (fileName = mySourceFileName). |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1958 |
sameFile ifFalse:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1959 |
mySourceFileName notNil ifTrue:[ |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1960 |
sameFile := (fileName asFilename info at:#id) == (mySourceFileName asFilename info at:#id) |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1961 |
] |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1962 |
]. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1963 |
] |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1964 |
]. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1965 |
]. |
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1966 |
|
967 | 1967 |
sameFile ifTrue:[ |
1968 |
^ FileOutErrorSignal |
|
1969 |
raiseRequestWith:fileName |
|
1970 |
errorString:('may not overwrite sourcefile:', fileName) |
|
1971 |
]. |
|
1107
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
1972 |
|
967 | 1973 |
fileName asFilename copyTo:('/tmp/' , baseName , '.sav'). |
1974 |
newFileName := dirName , baseName , '.new'. |
|
1975 |
needRename := true |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1976 |
] ifFalse:[ |
967 | 1977 |
newFileName := fileName. |
1978 |
needRename := false |
|
1 | 1979 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1980 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1981 |
aStream := FileStream newFileNamed:newFileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1982 |
aStream isNil ifTrue:[ |
967 | 1983 |
^ FileOutErrorSignal |
1984 |
raiseRequestWith:newFileName |
|
1985 |
errorString:('cannot create file:', newFileName) |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1986 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1987 |
self fileOutOn:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1988 |
aStream close. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1989 |
|
199 | 1990 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1991 |
finally, replace the old-file |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1992 |
be careful, if the old one is a symbolic link; in this case, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1993 |
we have to do a copy ... |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1994 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1995 |
needRename ifTrue:[ |
967 | 1996 |
newFileName asFilename copyTo:fileName. |
1997 |
newFileName asFilename delete |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1998 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
1999 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2000 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2001 |
add a change record; that way, administration is much easier, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2002 |
since we can see in that changeBrowser, which changes have |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2003 |
already found their way into a sourceFile and which must be |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2004 |
applied again |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2005 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2006 |
self addChangeRecordForClassFileOut:self |
1107
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
2007 |
|
e0411b74b808
allow fileOut over existing file, if all of my methods have local source strings
Claus Gittinger <cg@exept.de>
parents:
1102
diff
changeset
|
2008 |
"Modified: 19.3.1996 / 19:43:17 / cg" |
1 | 2009 |
! |
2010 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2011 |
fileOutCategory:aCategory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2012 |
"create a file 'class-category.st' consisting of all methods in aCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2013 |
If the current project is not nil, create the file in the projects |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2014 |
directory." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2015 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2016 |
|aStream fileName| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2017 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2018 |
fileName := name , '-' , aCategory , '.st'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2019 |
fileName replaceAll:(Character space) by:$_. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2020 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2021 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2022 |
this test allows a smalltalk to be built without Projects/ChangeSets |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2023 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2024 |
Project notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2025 |
fileName := Project currentProjectDirectory , fileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2026 |
]. |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
2027 |
|
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
2028 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2029 |
if file exists, save original in a .sav file |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
2030 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2031 |
fileName asFilename exists ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2032 |
fileName asFilename copyTo:(fileName , '.sav') |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2033 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2034 |
aStream := FileStream newFileNamed:fileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2035 |
aStream isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2036 |
^ FileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2037 |
raiseRequestWith:fileName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2038 |
errorString:('cannot create file:', fileName) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2039 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2040 |
self fileOutCategory:aCategory on:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2041 |
aStream close |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2042 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2043 |
|
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2044 |
fileOutCategory:aCategory except:skippedMethods only:savedMethods on:aStream |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2045 |
"file out all methods belonging to aCategory, aString onto aStream. |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2046 |
If skippedMethods is nonNil, those are not saved. |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2047 |
If savedMethods is nonNil, only those are saved. |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2048 |
If both are nil, all are saved. See version-method handling in |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2049 |
fileOut for what this is needed." |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2050 |
|
759
908363ce8a32
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
744
diff
changeset
|
2051 |
|source sortedSelectors first privacy interestingMethods| |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2052 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2053 |
methodArray notNil ifTrue:[ |
956 | 2054 |
interestingMethods := OrderedCollection new. |
2055 |
methodArray do:[:aMethod | |
|
2056 |
|wanted| |
|
2057 |
||
2058 |
(aCategory = aMethod category) ifTrue:[ |
|
2059 |
skippedMethods notNil ifTrue:[ |
|
2060 |
wanted := (skippedMethods includesIdentical:aMethod) not |
|
2061 |
] ifFalse:[ |
|
2062 |
savedMethods notNil ifTrue:[ |
|
2063 |
wanted := (savedMethods includesIdentical:aMethod). |
|
2064 |
] ifFalse:[ |
|
2065 |
wanted := true |
|
2066 |
] |
|
2067 |
]. |
|
2068 |
wanted ifTrue:[interestingMethods add:aMethod]. |
|
2069 |
] |
|
2070 |
]. |
|
2071 |
interestingMethods notEmpty ifTrue:[ |
|
2072 |
first := true. |
|
2073 |
privacy := nil. |
|
2074 |
||
2075 |
"/ |
|
2076 |
"/ sort by selector |
|
2077 |
"/ |
|
2078 |
sortedSelectors := interestingMethods collect:[:m | self selectorAtMethod:m]. |
|
2079 |
sortedSelectors sortWith:interestingMethods. |
|
2080 |
||
2081 |
interestingMethods do:[:aMethod | |
|
2082 |
first ifFalse:[ |
|
2083 |
privacy ~~ aMethod privacy ifTrue:[ |
|
2084 |
first := true. |
|
2085 |
aStream space. |
|
2086 |
aStream nextPutChunkSeparator. |
|
2087 |
]. |
|
2088 |
aStream cr; cr |
|
2089 |
]. |
|
2090 |
||
2091 |
privacy := aMethod privacy. |
|
2092 |
||
2093 |
first ifTrue:[ |
|
2094 |
aStream nextPutChunkSeparator. |
|
2095 |
self printClassNameOn:aStream. |
|
2096 |
privacy ~~ #public ifTrue:[ |
|
2097 |
aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'''. |
|
2098 |
] ifFalse:[ |
|
2099 |
aStream nextPutAll:' methodsFor:'''. |
|
2100 |
]. |
|
2101 |
aCategory notNil ifTrue:[ |
|
2102 |
aStream nextPutAll:aCategory |
|
2103 |
]. |
|
2104 |
aStream nextPut:$'; nextPutChunkSeparator; cr; cr. |
|
2105 |
first := false. |
|
2106 |
]. |
|
2107 |
source := aMethod source. |
|
2108 |
source isNil ifTrue:[ |
|
2109 |
FileOutErrorSignal |
|
2110 |
raiseRequestWith:self |
|
2111 |
errorString:'no source for method' |
|
2112 |
] ifFalse:[ |
|
2113 |
aStream nextChunkPut:source. |
|
2114 |
]. |
|
2115 |
]. |
|
2116 |
aStream space. |
|
2117 |
aStream nextPutChunkSeparator. |
|
2118 |
aStream cr |
|
2119 |
] |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2120 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2121 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2122 |
"Modified: 28.8.1995 / 14:30:41 / claus" |
956 | 2123 |
"Modified: 9.2.1996 / 17:59:13 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2124 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2125 |
|
662 | 2126 |
fileOutCategory:aCategory on:aStream |
2127 |
"file out all methods belonging to aCategory, aString onto aStream" |
|
2128 |
||
2129 |
self fileOutCategory:aCategory except:nil only:nil on:aStream |
|
2130 |
! |
|
2131 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2132 |
fileOutClassInstVarDefinitionOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2133 |
"append an expression to define my classInstanceVariables on aStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2134 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2135 |
aStream nextPutAll:(name , ' class instanceVariableNames:'''). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2136 |
self class printInstVarNamesOn:aStream indent:8. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2137 |
aStream nextPutAll:''''. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2138 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2139 |
"mhmh - good idea; saw this in SmallDraw sourcecode ..." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2140 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2141 |
aStream cr; cr; nextPut:(Character doubleQuote); cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2142 |
aStream space; |
738 | 2143 |
nextPutAll:'The following class instance variables are inherited by this class:'; |
2144 |
cr; cr. |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2145 |
self allSuperclassesDo:[:aSuperClass | |
738 | 2146 |
aStream tab; nextPutAll:aSuperClass name; nextPutAll:' - '. |
2147 |
aStream nextPutAll:(aSuperClass class instanceVariableString); cr. |
|
556 | 2148 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2149 |
aStream nextPut:(Character doubleQuote); cr. |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2150 |
|
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2151 |
"Created: 10.12.1995 / 16:31:25 / cg" |
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2152 |
"Modified: 10.12.1995 / 16:31:44 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2153 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2154 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2155 |
fileOutCommentOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2156 |
"append an expression on aStream, which defines my comment" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2157 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2158 |
|comment s| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2159 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2160 |
aStream nextPutAll:name; nextPutAll:' comment:'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2161 |
(comment := self comment) isNil ifTrue:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2162 |
s := '''''' |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2163 |
] ifFalse:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2164 |
s := comment storeString |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2165 |
]. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2166 |
aStream nextPutAllAsChunk:s. |
1063
b45a722a10c3
oops - forgot excla after comment-chunk
Claus Gittinger <cg@exept.de>
parents:
989
diff
changeset
|
2167 |
aStream nextPutChunkSeparator. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2168 |
aStream cr |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2169 |
|
1063
b45a722a10c3
oops - forgot excla after comment-chunk
Claus Gittinger <cg@exept.de>
parents:
989
diff
changeset
|
2170 |
"Modified: 4.3.1996 / 16:49:23 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2171 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2172 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2173 |
fileOutDefinitionOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2174 |
"append an expression on aStream, which defines myself." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2175 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2176 |
^ self basicFileOutDefinitionOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2177 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2178 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2179 |
fileOutIn:aFileDirectory |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2180 |
"create a file 'class.st' consisting of all methods in self in |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2181 |
directory aFileDirectory (ignoring any directory setting in |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2182 |
the current porject). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2183 |
This is not logged in that change file (should it be ?)." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2184 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2185 |
|aStream fileName| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2186 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2187 |
fileName := (Smalltalk fileNameForClass:self name) , '.st'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2188 |
aStream := FileStream newFileNamed:fileName in:aFileDirectory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2189 |
aStream isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2190 |
^ FileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2191 |
raiseRequestWith:fileName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2192 |
errorString:('cannot create file:', fileName) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2193 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2194 |
self fileOutOn:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2195 |
aStream close |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2196 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2197 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2198 |
fileOutMethod:aMethod |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2199 |
"create a file 'class-method.st' consisting of the method, aMethod. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2200 |
If the current project is not nil, create the file in the projects |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2201 |
directory." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2202 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2203 |
|aStream fileName selector| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2204 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2205 |
selector := self selectorAtMethod:aMethod. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2206 |
selector notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2207 |
fileName := name , '-' , selector, '.st'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2208 |
fileName replaceAll:$: by:$_. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2209 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2210 |
this test allows a smalltalk to be built without Projects/ChangeSets |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2211 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2212 |
Project notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2213 |
fileName := Project currentProjectDirectory , fileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2214 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2215 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2216 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2217 |
if file exists, save original in a .sav file |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2218 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2219 |
fileName asFilename exists ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2220 |
fileName asFilename copyTo:(fileName , '.sav') |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2221 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2222 |
aStream := FileStream newFileNamed:fileName. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2223 |
aStream isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2224 |
^ FileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2225 |
raiseRequestWith:fileName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2226 |
errorString:('cannot create file:', fileName) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2227 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2228 |
self fileOutMethod:aMethod on:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2229 |
aStream close |
555 | 2230 |
] |
2231 |
! |
|
2232 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2233 |
fileOutMethod:aMethod on:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2234 |
"file out the method, aMethod onto aStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2235 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2236 |
|cat source privacy| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2237 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2238 |
methodArray notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2239 |
aStream nextPutChunkSeparator. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2240 |
self printClassNameOn:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2241 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2242 |
(privacy := aMethod privacy) ~~ #public ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2243 |
aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'''. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2244 |
] ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2245 |
aStream nextPutAll:' methodsFor:'''. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2246 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2247 |
cat := aMethod category. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2248 |
cat notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2249 |
aStream nextPutAll:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2250 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2251 |
aStream nextPut:$'; nextPutChunkSeparator; cr; cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2252 |
source := aMethod source. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2253 |
source isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2254 |
FileOutErrorSignal |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2255 |
raiseRequestWith:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2256 |
errorString:('no source for method: ' , |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2257 |
self name , '>>' , |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2258 |
(self selectorAtMethod:aMethod)) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2259 |
] ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2260 |
aStream nextChunkPut:source. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2261 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2262 |
aStream space. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2263 |
aStream nextPutChunkSeparator. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2264 |
aStream cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2265 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2266 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2267 |
"Modified: 27.8.1995 / 01:23:19 / claus" |
555 | 2268 |
! |
2269 |
||
2270 |
fileOutOn:aStream |
|
2271 |
"file out my definition and all methods onto aStream" |
|
2272 |
||
2273 |
^ self fileOutOn:aStream withTimeStamp:true |
|
2274 |
||
2275 |
"Created: 15.11.1995 / 12:53:32 / cg" |
|
2276 |
! |
|
2277 |
||
2278 |
fileOutOn:aStream withTimeStamp:stampIt |
|
2279 |
"file out my definition and all methods onto aStream" |
|
2280 |
||
989 | 2281 |
|collectionOfCategories copyrightMethod copyrightText comment versionMethod skippedMethods |
2282 |
meta| |
|
555 | 2283 |
|
2284 |
self isLoaded ifFalse:[ |
|
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2285 |
^ FileOutErrorSignal |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2286 |
raiseRequestWith:self |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2287 |
errorString:'will not fileOut unloaded classes' |
555 | 2288 |
]. |
2289 |
||
989 | 2290 |
meta := self class. |
2291 |
||
555 | 2292 |
" |
2293 |
if there is a copyright method, add a copyright comment |
|
2294 |
at the beginning, taking the string from the copyright method. |
|
2295 |
We cannot do this unconditionally - that would lead to my copyrights |
|
2296 |
being put on your code ;-). |
|
2297 |
On the other hand: I want every file created by myself to have the |
|
2298 |
copyright string at the beginning be preserved .... even if the |
|
2299 |
code was edited in the browser and filedOut. |
|
2300 |
" |
|
989 | 2301 |
(copyrightMethod := meta compiledMethodAt:#copyright) notNil ifTrue:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2302 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2303 |
get the copyright methods source, |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2304 |
and insert at beginning. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2305 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2306 |
copyrightText := copyrightMethod source. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2307 |
copyrightText isNil ifTrue:[ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2308 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2309 |
no source available - trigger an error |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2310 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2311 |
FileOutErrorSignal |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2312 |
raiseRequestWith:'no source for class ' , name , ' available. Cannot fileOut'. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2313 |
^ self |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2314 |
]. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2315 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2316 |
strip off the selector-line |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2317 |
" |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2318 |
copyrightText := copyrightText asCollectionOfLines asStringCollection. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2319 |
copyrightText := copyrightText copyFrom:2 to:(copyrightText size). |
717
a9d03e3c21cf
handle (i.e. double) exclas in the extracted copyRightText
Claus Gittinger <cg@exept.de>
parents:
708
diff
changeset
|
2320 |
"/ copyrightText do:[:line | aStream nextPutAll:line. aStream cr.]. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2321 |
copyrightText := copyrightText asString. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2322 |
aStream nextPutAllAsChunk:copyrightText. |
555 | 2323 |
]. |
2324 |
||
2325 |
stampIt ifTrue:[ |
|
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2326 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2327 |
"/ first, a timestamp |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2328 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2329 |
aStream nextPutAll:(Smalltalk timeStamp). |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2330 |
aStream nextPutChunkSeparator. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2331 |
aStream cr; cr. |
555 | 2332 |
]. |
2333 |
||
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2334 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2335 |
"/ then the definition |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2336 |
"/ |
555 | 2337 |
self fileOutDefinitionOn:aStream. |
2338 |
aStream nextPutChunkSeparator. |
|
2339 |
aStream cr; cr. |
|
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2340 |
|
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2341 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2342 |
"/ optional classInstanceVariables |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2343 |
"/ |
989 | 2344 |
meta instanceVariableString isBlank ifFalse:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2345 |
self fileOutClassInstVarDefinitionOn:aStream. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2346 |
aStream nextPutChunkSeparator. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2347 |
aStream cr; cr |
1 | 2348 |
]. |
555 | 2349 |
|
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2350 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2351 |
"/ a comment - if any |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2352 |
"/ |
555 | 2353 |
(comment := self comment) notNil ifTrue:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2354 |
self fileOutCommentOn:aStream. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2355 |
aStream cr. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2356 |
"/ aStream nextPutAll:name; nextPutAll:' comment:'. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2357 |
"/ aStream nextPutAll:(comment storeString). |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2358 |
"/ aStream nextPutChunkSeparator. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2359 |
"/ aStream cr; cr |
555 | 2360 |
]. |
2361 |
||
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2362 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2363 |
"/ primitive definitions - if any |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2364 |
"/ |
555 | 2365 |
self fileOutPrimitiveSpecsOn:aStream. |
2366 |
||
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2367 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2368 |
"/ methods from all categories in metaclass (i.e. class methods) |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2369 |
"/ EXCEPT: the version method is placed at the very end, to |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2370 |
"/ avoid sourcePosition-shifts when checked out later. |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2371 |
"/ |
989 | 2372 |
collectionOfCategories := meta categories asSortedCollection. |
555 | 2373 |
collectionOfCategories notNil ifTrue:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2374 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2375 |
"/ documentation first (if any), but not the version method |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2376 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2377 |
(collectionOfCategories includes:'documentation') ifTrue:[ |
989 | 2378 |
versionMethod := meta compiledMethodAt:#version. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2379 |
versionMethod notNil ifTrue:[ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2380 |
skippedMethods := Array with:versionMethod |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2381 |
]. |
989 | 2382 |
meta fileOutCategory:'documentation' except:skippedMethods only:nil on:aStream. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2383 |
aStream cr. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2384 |
]. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2385 |
|
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2386 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2387 |
"/ initialization next (if any) |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2388 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2389 |
(collectionOfCategories includes:'initialization') ifTrue:[ |
989 | 2390 |
meta fileOutCategory:'initialization' on:aStream. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2391 |
aStream cr. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2392 |
]. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2393 |
|
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2394 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2395 |
"/ instance creation next (if any) |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2396 |
"/ |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2397 |
(collectionOfCategories includes:'instance creation') ifTrue:[ |
989 | 2398 |
meta fileOutCategory:'instance creation' on:aStream. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2399 |
aStream cr. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2400 |
]. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2401 |
collectionOfCategories do:[:aCategory | |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2402 |
((aCategory ~= 'documentation') |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2403 |
and:[(aCategory ~= 'initialization') |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2404 |
and:[aCategory ~= 'instance creation']]) ifTrue:[ |
989 | 2405 |
meta fileOutCategory:aCategory on:aStream. |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2406 |
aStream cr |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2407 |
] |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2408 |
] |
555 | 2409 |
]. |
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2410 |
|
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2411 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2412 |
"/ methods from all categories in myself |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2413 |
"/ |
555 | 2414 |
collectionOfCategories := self categories asSortedCollection. |
2415 |
collectionOfCategories notNil ifTrue:[ |
|
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2416 |
collectionOfCategories do:[:aCategory | |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2417 |
self fileOutCategory:aCategory on:aStream. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2418 |
aStream cr |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2419 |
] |
555 | 2420 |
]. |
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2421 |
|
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2422 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2423 |
"/ finally, the previously skipped version method |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2424 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2425 |
versionMethod notNil ifTrue:[ |
989 | 2426 |
meta fileOutCategory:'documentation' except:nil only:skippedMethods on:aStream. |
638
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2427 |
]. |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2428 |
|
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2429 |
"/ |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2430 |
"/ optionally an initialize message |
70584e2d2f38
place version method at the end
Claus Gittinger <cg@exept.de>
parents:
625
diff
changeset
|
2431 |
"/ |
989 | 2432 |
(meta implements:#initialize) ifTrue:[ |
988
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2433 |
aStream nextPutAll:(name , ' initialize'). |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2434 |
aStream nextPutChunkSeparator. |
b17239b51874
double exclas in comment (when filing out)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
2435 |
aStream cr |
555 | 2436 |
] |
2437 |
||
2438 |
"Created: 15.11.1995 / 12:53:06 / cg" |
|
989 | 2439 |
"Modified: 21.2.1996 / 15:06:36 / cg" |
555 | 2440 |
! |
2441 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2442 |
fileOutPrimitiveDefinitionsOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2443 |
"append primitive defs (if any) to aStream." |
555 | 2444 |
|
2445 |
|s| |
|
2446 |
||
2447 |
" |
|
2448 |
primitive definitions - if any |
|
2449 |
" |
|
2450 |
(s := self primitiveDefinitionsString) notNil ifTrue:[ |
|
2451 |
aStream nextPutChunkSeparator; |
|
2452 |
nextPutAll:name; nextPutAll:' primitiveDefinitions'; |
|
2453 |
nextPutChunkSeparator; |
|
2454 |
cr. |
|
2455 |
aStream nextPutAll:s. |
|
2456 |
aStream nextPutChunkSeparator; space; nextPutChunkSeparator; cr; cr |
|
2457 |
]. |
|
2458 |
(s := self primitiveVariablesString) notNil ifTrue:[ |
|
2459 |
aStream nextPutChunkSeparator; |
|
2460 |
nextPutAll:name; nextPutAll:' primitiveVariables'; |
|
2461 |
nextPutChunkSeparator; |
|
2462 |
cr. |
|
2463 |
aStream nextPutAll:s. |
|
2464 |
aStream nextPutChunkSeparator; space; nextPutChunkSeparator; cr; cr |
|
2465 |
]. |
|
2466 |
! |
|
2467 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2468 |
fileOutPrimitiveSpecsOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2469 |
"append primitive defs (if any) to aStream." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2470 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2471 |
|s| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2472 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2473 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2474 |
primitive definitions - if any |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2475 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2476 |
self fileOutPrimitiveDefinitionsOn:aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2477 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2478 |
primitive functions - if any |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2479 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2480 |
(s := self primitiveFunctionsString) notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2481 |
aStream nextPutChunkSeparator; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2482 |
nextPutAll:name; nextPutAll:' primitiveFunctions'; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2483 |
nextPutChunkSeparator; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2484 |
cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2485 |
aStream nextPutAll:s. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2486 |
aStream nextPutChunkSeparator; space; nextPutChunkSeparator; cr; cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2487 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2488 |
! ! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2489 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2490 |
!Class methodsFor:'printOut'! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2491 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2492 |
printClassNameOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2493 |
"helper for fileOut - print my name if I am not a Metaclass; |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2494 |
otherwise my name without -class followed by space-class" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2495 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2496 |
self isMeta ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2497 |
aStream nextPutAll:(name copyTo:(name size - 5)); nextPutAll:' class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2498 |
] ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2499 |
name printOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2500 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2501 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2502 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2503 |
printClassVarNamesOn:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2504 |
"print the class variable names indented and breaking at line end" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2505 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2506 |
self printNameArray:(self classVarNames) on:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2507 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2508 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2509 |
printFullHierarchyOn:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2510 |
"print myself and all subclasses on aStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2511 |
recursively calls itself to print subclasses. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2512 |
Can be used to print hierarchy on the printer." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2513 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2514 |
aStream spaces:indent; bold; nextPutAll:name; normal; nextPutAll:' ('. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2515 |
self printInstVarNamesOn:aStream indent:(indent + name size + 2). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2516 |
aStream nextPutAll:')'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2517 |
aStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2518 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2519 |
(self subclasses sort:[:a :b | a name < b name]) do:[:aSubclass | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2520 |
aSubclass printFullHierarchyOn:aStream indent:(indent + 2) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2521 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2522 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2523 |
"|printStream| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2524 |
printStream := Printer new. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2525 |
Object printFullHierarchyOn:printStream indent:0. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2526 |
printStream close" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2527 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2528 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2529 |
printHierarchyAnswerIndentOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2530 |
"print my class hierarchy on aStream - return indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2531 |
recursively calls itself to print superclass and use returned indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2532 |
for my description - used in the browser" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2533 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2534 |
|indent| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2535 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2536 |
indent := 0. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2537 |
(superclass notNil) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2538 |
indent := (superclass printHierarchyAnswerIndentOn:aStream) + 2 |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2539 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2540 |
aStream spaces:indent. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2541 |
aStream nextPutAll:name; nextPutAll:' ('. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2542 |
self printInstVarNamesOn:aStream indent:(indent + name size + 2). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2543 |
aStream nextPutAll:')'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2544 |
aStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2545 |
^ indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2546 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2547 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2548 |
printHierarchyOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2549 |
"print my class hierarchy on aStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2550 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2551 |
self printHierarchyAnswerIndentOn:aStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2552 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2553 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2554 |
printInstVarNamesOn:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2555 |
"print the instance variable names indented and breaking at line end" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2556 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2557 |
self printNameArray:(self instVarNames) on:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2558 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2559 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2560 |
printNameArray:anArray on:aStream indent:indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2561 |
"print an array of strings separated by spaces; when the stream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2562 |
defines a lineLength, break when this limit is reached; indent |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2563 |
every line; used to printOut instance variable names" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2564 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2565 |
|thisName nextName arraySize lenMax pos mustBreak line spaces| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2566 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2567 |
arraySize := anArray size. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2568 |
arraySize ~~ 0 ifTrue:[ |
738 | 2569 |
pos := indent. |
2570 |
lenMax := aStream lineLength. |
|
2571 |
thisName := anArray at:1. |
|
2572 |
line := ''. |
|
2573 |
1 to:arraySize do:[:index | |
|
2574 |
line := line , thisName. |
|
2575 |
pos := pos + thisName size. |
|
2576 |
(index == arraySize) ifFalse:[ |
|
2577 |
nextName := anArray at:(index + 1). |
|
2578 |
mustBreak := false. |
|
2579 |
(lenMax > 0) ifTrue:[ |
|
2580 |
((pos + nextName size) > lenMax) ifTrue:[ |
|
2581 |
mustBreak := true |
|
2582 |
] |
|
2583 |
]. |
|
2584 |
mustBreak ifTrue:[ |
|
2585 |
aStream nextPutAll:line withTabs. |
|
2586 |
aStream cr. |
|
2587 |
spaces isNil ifTrue:[ |
|
2588 |
spaces := String new:indent |
|
2589 |
]. |
|
2590 |
line := spaces. |
|
2591 |
pos := indent |
|
2592 |
] ifFalse:[ |
|
2593 |
line := line , ' '. |
|
2594 |
pos := pos + 1 |
|
2595 |
]. |
|
2596 |
thisName := nextName |
|
2597 |
] |
|
2598 |
]. |
|
2599 |
aStream nextPutAll:line withTabs |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2600 |
] |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2601 |
|
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2602 |
"Created: 10.12.1995 / 16:34:23 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2603 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2604 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2605 |
printOutCategory:aCategory on:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2606 |
"print out all methods in aCategory on aPrintStream should be a PrintStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2607 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2608 |
|any| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2609 |
methodArray notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2610 |
any := false. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2611 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2612 |
(aCategory = aMethod category) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2613 |
any := true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2614 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2615 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2616 |
any ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2617 |
aPrintStream italic. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2618 |
aPrintStream nextPutAll:aCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2619 |
aPrintStream normal. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2620 |
aPrintStream cr; cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2621 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2622 |
(aCategory = aMethod category) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2623 |
self printOutSource:(aMethod source) on:aPrintStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2624 |
aPrintStream cr; cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2625 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2626 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2627 |
aPrintStream cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2628 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2629 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2630 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2631 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2632 |
printOutCategoryProtocol:aCategory on:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2633 |
|any| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2634 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2635 |
methodArray notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2636 |
any := false. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2637 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2638 |
(aCategory = aMethod category) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2639 |
any := true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2640 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2641 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2642 |
any ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2643 |
aPrintStream italic. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2644 |
aPrintStream nextPutAll:aCategory. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2645 |
aPrintStream normal. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2646 |
aPrintStream cr; cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2647 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2648 |
(aCategory = aMethod category) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2649 |
self printOutSourceProtocol:aMethod |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2650 |
on:aPrintStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2651 |
aPrintStream cr; cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2652 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2653 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2654 |
aPrintStream cr |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2655 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2656 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2657 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2658 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2659 |
printOutDefinitionOn:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2660 |
"print out my definition" |
1 | 2661 |
|
333 | 2662 |
|comment s| |
2663 |
||
2664 |
aPrintStream nextPutAll:'class '; bold; nextPutAll:name; normal; cr. |
|
1 | 2665 |
aPrintStream nextPutAll:'superclass '. |
2666 |
superclass isNil ifTrue:[ |
|
738 | 2667 |
s := 'Object' |
1 | 2668 |
] ifFalse:[ |
738 | 2669 |
s := superclass name |
1 | 2670 |
]. |
333 | 2671 |
aPrintStream nextPutAll:s. |
1 | 2672 |
aPrintStream cr. |
2673 |
||
2674 |
aPrintStream nextPutAll:'instance Variables '. |
|
2675 |
self printInstVarNamesOn:aPrintStream indent:21. |
|
2676 |
aPrintStream cr. |
|
2677 |
||
2678 |
aPrintStream nextPutAll:'class Variables '. |
|
2679 |
self printClassVarNamesOn:aPrintStream indent:21. |
|
2680 |
aPrintStream cr. |
|
2681 |
||
2682 |
category notNil ifTrue:[ |
|
738 | 2683 |
aPrintStream nextPutAll:'category '; nextPutAll:(category printString). |
2684 |
aPrintStream cr |
|
1 | 2685 |
]. |
2686 |
||
193 | 2687 |
(comment := self comment) notNil ifTrue:[ |
738 | 2688 |
aPrintStream cr; nextPutAll:'comment:'; cr; italic; nextPutAll:comment; normal; cr |
1 | 2689 |
] |
733
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2690 |
|
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2691 |
"Created: 10.12.1995 / 16:30:47 / cg" |
983d045c17f5
make definition indent be tabs (to avoid CVS seeing differences where none are)
Claus Gittinger <cg@exept.de>
parents:
726
diff
changeset
|
2692 |
"Modified: 10.12.1995 / 16:32:01 / cg" |
1 | 2693 |
! |
2694 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2695 |
printOutOn:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2696 |
"print out all methods on aPrintStream which should be a printStream" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2697 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2698 |
|collectionOfCategories| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2699 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2700 |
self printOutDefinitionOn:aPrintStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2701 |
aPrintStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2702 |
collectionOfCategories := self class categories. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2703 |
collectionOfCategories notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2704 |
aPrintStream nextPutAll:'class protocol'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2705 |
aPrintStream cr; cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2706 |
collectionOfCategories do:[:aCategory | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2707 |
self class printOutCategory:aCategory on:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2708 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2709 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2710 |
collectionOfCategories := self categories. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2711 |
collectionOfCategories notNil ifTrue:[ |
555 | 2712 |
aPrintStream nextPutAll:'instance protocol'. |
2713 |
aPrintStream cr; cr. |
|
2714 |
collectionOfCategories do:[:aCategory | |
|
2715 |
self printOutCategory:aCategory on:aPrintStream |
|
2716 |
] |
|
2717 |
] |
|
2718 |
! |
|
2719 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2720 |
printOutProtocolOn:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2721 |
|collectionOfCategories| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2722 |
self printOutDefinitionOn:aPrintStream. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2723 |
aPrintStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2724 |
collectionOfCategories := self class categories. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2725 |
collectionOfCategories notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2726 |
aPrintStream nextPutAll:'class protocol'. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2727 |
aPrintStream cr; cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2728 |
collectionOfCategories do:[:aCategory | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2729 |
self class printOutCategoryProtocol:aCategory on:aPrintStream |
555 | 2730 |
] |
2731 |
]. |
|
2732 |
collectionOfCategories := self categories. |
|
2733 |
collectionOfCategories notNil ifTrue:[ |
|
2734 |
aPrintStream nextPutAll:'instance protocol'. |
|
2735 |
aPrintStream cr; cr. |
|
2736 |
collectionOfCategories do:[:aCategory | |
|
2737 |
self printOutCategoryProtocol:aCategory on:aPrintStream |
|
2738 |
] |
|
2739 |
] |
|
1 | 2740 |
! |
2741 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2742 |
printOutSource:aString on:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2743 |
"print out a source-string; the message-specification is printed bold, |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2744 |
comments are printed italic" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2745 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2746 |
|text textIndex textSize line lineIndex lineSize inComment aCharacter| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2747 |
text := aString asStringCollection. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2748 |
aPrintStream bold. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2749 |
aPrintStream nextPutAll:(text at:1). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2750 |
aPrintStream normal. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2751 |
aPrintStream cr. |
1 | 2752 |
inComment := false. |
2753 |
textSize := text size. |
|
2754 |
textIndex := 2. |
|
2755 |
[textIndex <= textSize] whileTrue:[ |
|
153 | 2756 |
line := text at:textIndex. |
2757 |
((line occurrencesOf:Character doubleQuote) == 0) ifTrue:[ |
|
2758 |
aPrintStream nextPutAll:line |
|
2759 |
] ifFalse:[ |
|
2760 |
lineSize := line size. |
|
2761 |
lineIndex := 1. |
|
2762 |
[lineIndex <= lineSize] whileTrue:[ |
|
2763 |
aCharacter := line at:lineIndex. |
|
2764 |
(aCharacter == Character doubleQuote) ifTrue:[ |
|
2765 |
inComment ifTrue:[ |
|
2766 |
aPrintStream normal. |
|
2767 |
aPrintStream nextPut:aCharacter. |
|
2768 |
inComment := false |
|
2769 |
] ifFalse:[ |
|
2770 |
aPrintStream nextPut:aCharacter. |
|
2771 |
aPrintStream italic. |
|
2772 |
inComment := true |
|
2773 |
] |
|
2774 |
] ifFalse:[ |
|
2775 |
aPrintStream nextPut:aCharacter |
|
2776 |
]. |
|
2777 |
lineIndex := lineIndex + 1 |
|
2778 |
] |
|
2779 |
]. |
|
2780 |
aPrintStream cr. |
|
2781 |
textIndex := textIndex + 1 |
|
1 | 2782 |
] |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2783 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2784 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2785 |
printOutSourceProtocol:aMethod on:aPrintStream |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2786 |
"given the source in aString, print the methods message specification |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2787 |
and any method comments - without source; used to generate documentation |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2788 |
pages" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2789 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2790 |
|text| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2791 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2792 |
text := aMethod source asStringCollection. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2793 |
(text size < 1) ifTrue:[^self]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2794 |
aPrintStream bold. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2795 |
aPrintStream nextPutAll:(text at:1). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2796 |
aPrintStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2797 |
(text size >= 2) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2798 |
aPrintStream italic. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2799 |
aPrintStream spaces:((text at:2) indexOfNonSeparatorStartingAt:1). |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2800 |
aPrintStream nextPutAll:aMethod comment. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2801 |
aPrintStream cr. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2802 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2803 |
aPrintStream normal |
555 | 2804 |
|
2805 |
" |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2806 |
Float printOutProtocolOn:Stdout |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
2807 |
" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2808 |
! ! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
2809 |
|
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2810 |
!Class methodsFor:'private changes management'! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2811 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2812 |
addChangeRecordForChangeCategory:category to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2813 |
"append a category change record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2814 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2815 |
self printClassNameOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2816 |
aStream nextPutAll:(' category:' , category storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2817 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2818 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2819 |
"this test allows a smalltalk without Projects/ChangeSets" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2820 |
Project notNil ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2821 |
Project addClassDefinitionChangeFor:self |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2822 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2823 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2824 |
"Created: 3.12.1995 / 13:43:33 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2825 |
"Modified: 3.12.1995 / 14:10:34 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2826 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2827 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2828 |
addChangeRecordForClass:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2829 |
"append a class-definition-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2830 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2831 |
aClass isLoaded ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2832 |
aClass fileOutDefinitionOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2833 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2834 |
Project notNil ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2835 |
Project addClassDefinitionChangeFor:aClass |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2836 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2837 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2838 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2839 |
"Created: 3.12.1995 / 13:57:44 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2840 |
"Modified: 3.12.1995 / 14:11:26 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2841 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2842 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2843 |
addChangeRecordForClassComment:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2844 |
"append a class-comment-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2845 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2846 |
aClass fileOutCommentOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2847 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2848 |
"Modified: 4.3.1996 / 16:49:08 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2849 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2850 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2851 |
addChangeRecordForClassInstvars:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2852 |
"append a class-instvars-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2853 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2854 |
aClass fileOutClassInstVarDefinitionOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2855 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2856 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2857 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2858 |
addChangeRecordForClassRemove:oldName to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2859 |
"append a class-remove-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2860 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2861 |
aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2862 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2863 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2864 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2865 |
addChangeRecordForClassRename:oldName to:newName to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2866 |
"append a class-rename-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2867 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2868 |
aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , ''''). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2869 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2870 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2871 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2872 |
addChangeRecordForMethod:aMethod to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2873 |
"append a method-change-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2874 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2875 |
self fileOutMethod:aMethod on:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2876 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2877 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2878 |
addChangeRecordForMethodCategory:aMethod category:newCategory to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2879 |
"append a methodCategory-change-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2880 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2881 |
|selector| |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2882 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2883 |
selector := aMethod selector. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2884 |
selector notNil ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2885 |
aStream nextPutAll:'('. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2886 |
self printClassNameOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2887 |
aStream nextPutAll:(' compiledMethodAt:' , selector storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2888 |
aStream nextPutAll:(') category:' , newCategory storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2889 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2890 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2891 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2892 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2893 |
addChangeRecordForMethodPrivacy:aMethod to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2894 |
"append a method-privacy-change-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2895 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2896 |
|selector| |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2897 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2898 |
selector := aMethod selector. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2899 |
selector notNil ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2900 |
aStream nextPutAll:'('. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2901 |
self printClassNameOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2902 |
aStream nextPutAll:(' compiledMethodAt:' , selector storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2903 |
aStream nextPutAll:(') privacy:' , aMethod privacy storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2904 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2905 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2906 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2907 |
"Modified: 27.8.1995 / 22:59:56 / claus" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2908 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2909 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2910 |
addChangeRecordForPrimitiveDefinitions:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2911 |
"append a primitiveDefinitions-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2912 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2913 |
aStream nextPutAll:aClass name; nextPutAll:' primitiveDefinitions:'''; cr; |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2914 |
nextPutAll:(aClass primitiveDefinitionsString storeString copyFrom:2). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2915 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2916 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2917 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2918 |
addChangeRecordForPrimitiveFunctions:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2919 |
"append a primitiveFunctions-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2920 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2921 |
aStream nextPutAll:aClass name; nextPutAll:' primitiveFunctions:'''; cr; |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2922 |
nextPutAll:(aClass primitiveFunctionsString storeString copyFrom:2). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2923 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2924 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2925 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2926 |
addChangeRecordForPrimitiveVariables:aClass to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2927 |
"append a primitiveVariables-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2928 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2929 |
aStream nextPutAll:aClass name; nextPutAll:' primitiveVariables:'''; cr; |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2930 |
nextPutAll:(aClass primitiveVariablesString storeString copyFrom:2). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2931 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2932 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2933 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2934 |
addChangeRecordForRemoveSelector:aSelector to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2935 |
"append a method-remove-record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2936 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2937 |
self printClassNameOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2938 |
aStream nextPutAll:(' removeSelector:#' , aSelector). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2939 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2940 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2941 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2942 |
addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2943 |
"append a category-rename record to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2944 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2945 |
self printClassNameOn:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2946 |
aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2947 |
aStream nextPutAll:(' to:' , newCategory storeString). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2948 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2949 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2950 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2951 |
addInfoRecord:aMessage to:aStream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2952 |
"append an info-record (snapshot, class fileOut etc.) to aStream" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2953 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2954 |
aStream nextPutAll:('''---- ' , aMessage , ' ', |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2955 |
Date today printString , ' ' , |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2956 |
Time now printString , |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2957 |
' ----'''). |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2958 |
aStream nextPutChunkSeparator. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2959 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2960 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2961 |
writingChangeDo:aBlock |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2962 |
"common helper to write a change record. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2963 |
Opens the changefile and executes aBlock passing the stream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2964 |
as argument. WriteErrors are cought and will lead to a warning. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2965 |
The changefile is not kept open, to force the change to go to disk |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2966 |
as soon as possible - thus, in case of a crash, no changes should |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2967 |
be lost due to buffering." |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2968 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2969 |
self writingChangeWithTimeStamp:true do:aBlock |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2970 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2971 |
"Modified: 18.11.1995 / 15:43:36 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2972 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2973 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2974 |
writingChangePerform:aSelector with:anArgument |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2975 |
self writingChangeWithTimeStamp:true perform:aSelector with:anArgument |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2976 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2977 |
"Created: 28.10.1995 / 16:50:48 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2978 |
"Modified: 18.11.1995 / 15:44:53 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2979 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2980 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2981 |
writingChangeWithTimeStamp:doStampIt do:aBlock |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2982 |
"common helper to write a change record. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2983 |
Opens the changefile and executes aBlock passing the stream |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2984 |
as argument. WriteErrors are cought and will lead to a warning. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2985 |
The changefile is not kept open, to force the change to go to disk |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2986 |
as soon as possible - thus, in case of a crash, no changes should |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2987 |
be lost due to buffering." |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2988 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2989 |
ChangeFileAccessLock critical:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2990 |
|aStream| |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2991 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2992 |
aStream := self changesStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2993 |
aStream notNil ifTrue:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2994 |
FileStream writeErrorSignal handle:[:ex | |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2995 |
self warn:('could not update the changes-file\\' , ex errorString) withCRs. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2996 |
ex return |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2997 |
] do:[ |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2998 |
doStampIt ifTrue:[self addChangeTimeStampTo:aStream]. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
2999 |
aBlock value:aStream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3000 |
aStream cr. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3001 |
]. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3002 |
aStream close |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3003 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3004 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3005 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3006 |
"Created: 18.11.1995 / 15:36:02 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3007 |
"Modified: 21.3.1996 / 16:32:30 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3008 |
! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3009 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3010 |
writingChangeWithTimeStamp:stampIt perform:aSelector with:anArgument |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3011 |
self writingChangeWithTimeStamp:stampIt do:[:stream | |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3012 |
self perform:aSelector with:anArgument with:stream. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3013 |
] |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3014 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3015 |
"Created: 18.11.1995 / 15:44:28 / cg" |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3016 |
! ! |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3017 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3018 |
!Class methodsFor:'private helpers'! |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3019 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3020 |
addAllCategoriesTo:aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3021 |
"helper - add categories and all superclasses categories |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3022 |
to the argument, aCollection" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3023 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3024 |
(superclass notNil) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3025 |
superclass addAllCategoriesTo:aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3026 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3027 |
self addCategoriesTo:aCollection |
556 | 3028 |
! |
3029 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3030 |
addAllClassVarNamesTo:aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3031 |
"helper - add the name-strings of the class variables and of the class-vars |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3032 |
of all superclasses to the argument, aCollection. Return aCollection" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3033 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3034 |
(superclass notNil) ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3035 |
superclass addAllClassVarNamesTo:aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3036 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3037 |
classvars notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3038 |
aCollection addAll:(classvars asCollectionOfWords). |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3039 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3040 |
^ aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3041 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3042 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3043 |
addCategoriesTo:aCollection |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3044 |
"helper - add categories to the argument, aCollection" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3045 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3046 |
methodArray do:[:aMethod | |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3047 |
|cat| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3048 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3049 |
cat := aMethod category. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3050 |
(aCollection includes:cat) ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3051 |
aCollection add:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3052 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3053 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3054 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3055 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3056 |
askIfUpdatingChanges |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3057 |
UpdateChangeFileQuerySignal isHandled ifFalse:[^ UpdatingChanges]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3058 |
^ UpdateChangeFileQuerySignal raise |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3059 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3060 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3061 |
getPrimitiveSpecsAt:index |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3062 |
"return a primitiveSpecification component as string or nil" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3063 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3064 |
|pos stream string| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3065 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3066 |
primitiveSpec isNil ifTrue:[^ nil]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3067 |
pos := primitiveSpec at:index. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3068 |
pos isNil ifTrue:[^ nil]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3069 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3070 |
"the primitiveSpec is either a string, or an integer specifying the |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3071 |
position within the classes sourcefile ... |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3072 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3073 |
pos isNumber ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3074 |
classFilename notNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3075 |
stream := self sourceStream. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3076 |
stream notNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3077 |
stream position:pos+1. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3078 |
string := stream nextChunk. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3079 |
stream close. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3080 |
^ string |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3081 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3082 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3083 |
^ nil |
544 | 3084 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3085 |
^ pos |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3086 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3087 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3088 |
setPrimitiveSpecsAt:index to:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3089 |
"set a primitiveSpecification component to aString" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3090 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3091 |
primitiveSpec isNil ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3092 |
primitiveSpec := Array new:3 |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3093 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3094 |
primitiveSpec at:index put:aString |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3095 |
! ! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3096 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3097 |
!Class methodsFor:'queries'! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3098 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3099 |
allCategories |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3100 |
"Return a collection of all method-categories known in class |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3101 |
and all superclasses. This does NOT include the metaclass categories. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3102 |
The returned collection is not sorted by any order." |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3103 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3104 |
|coll| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3105 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3106 |
coll := OrderedCollection new. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3107 |
self addAllCategoriesTo:coll. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3108 |
^ coll |
453 | 3109 |
|
3110 |
" |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3111 |
Point categories |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3112 |
Point allCategories |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3113 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3114 |
Point class categories |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3115 |
Point class allCategories |
453 | 3116 |
" |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3117 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3118 |
"Modified: 21.3.1996 / 16:28:57 / cg" |
453 | 3119 |
! |
3120 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3121 |
categories |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3122 |
"Return a collection of all method-categories known in the receiver class. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3123 |
This does NOT include the metaclasses categories. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3124 |
The returned collection is not sorted by any order." |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3125 |
|
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3126 |
|newList cat| |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3127 |
|
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3128 |
newList := OrderedCollection new. |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3129 |
methodArray do:[:aMethod | |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3130 |
cat := aMethod category. |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3131 |
newList indexOf:cat ifAbsent:[newList add:cat] |
457
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3132 |
]. |
41c73cbee305
change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents:
453
diff
changeset
|
3133 |
^ newList |
453 | 3134 |
|
3135 |
" |
|
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3136 |
Point categories |
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3137 |
Point class categories |
293 | 3138 |
" |
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3139 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3140 |
"Modified: 21.3.1996 / 16:28:06 / cg" |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3141 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3142 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3143 |
isClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3144 |
"return true, if the receiver is some kind of class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3145 |
(a real class, not just behavior); |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3146 |
true is returned here - the method is redefined from Object. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3147 |
See also Behavior>>isBehavior." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3148 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3149 |
^ true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3150 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3151 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3152 |
Point isClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3153 |
1 isClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3154 |
Behavior new isBehavior |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3155 |
Behavior new isClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3156 |
Class new isBehavior |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3157 |
Class new isClass |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3158 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3159 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3160 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3161 |
wasAutoloaded |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3162 |
"return true, if this class came into the system via an |
555 | 3163 |
autoload; false otherwise. |
3164 |
This is not an attribute of the class, but instead remembered in |
|
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3165 |
Autoload. The interface here is for your convenience." |
555 | 3166 |
|
3167 |
^ Autoload wasAutoloaded:self |
|
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3168 |
|
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3169 |
"Modified: 21.3.1996 / 16:27:09 / cg" |
555 | 3170 |
! |
3171 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3172 |
whichClassDefinesClassVar:aVariableName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3173 |
"return the class which defines the class variable |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3174 |
named aVariableName. This method should not be used for |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3175 |
repeated searches (i.e. in the compiler/parser), since it creates |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3176 |
many throw away intermediate objects." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3177 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3178 |
|cls| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3179 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3180 |
cls := self. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3181 |
[cls notNil] whileTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3182 |
(cls classVarNames includes:aVariableName) ifTrue:[ ^ cls]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3183 |
cls := cls superclass |
556 | 3184 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3185 |
^ nil |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3186 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3187 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3188 |
StandardSystemView whichClassDefinesClassVar:'ErrorSignal' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3189 |
StandardSystemView whichClassDefinesClassVar:'Foo' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3190 |
" |
556 | 3191 |
! |
3192 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3193 |
whichClassDefinesInstVar:aVariableName |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3194 |
"return the class which defines the instance variable |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3195 |
named aVariableName. This method should not be used for |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3196 |
repeated searches (i.e. in the compiler/parser), since it creates |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3197 |
many throw away intermediate objects." |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3198 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3199 |
|cls| |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3200 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3201 |
cls := self. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3202 |
[cls notNil] whileTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3203 |
(cls instVarNames includes:aVariableName) ifTrue:[ ^ cls]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3204 |
cls := cls superclass |
453 | 3205 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3206 |
^ nil |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3207 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3208 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3209 |
StandardSystemView whichClassDefinesInstVar:'label' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3210 |
StandardSystemView whichClassDefinesInstVar:'paint' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3211 |
StandardSystemView whichClassDefinesInstVar:'foo' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3212 |
" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3213 |
! ! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3214 |
|
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3215 |
!Class methodsFor:'source management'! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3216 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3217 |
binaryRevision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3218 |
"return the revision-ID from which the class was stc-compiled; |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3219 |
nil if its an autoloaded or filedIn class. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3220 |
If a classes binary is up-to-date w.r.t. the source repository, |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3221 |
the returned string is the same as the one returned by #revision." |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3222 |
|
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3223 |
self isMeta ifTrue:[ |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3224 |
^ self soleInstance binaryRevision |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3225 |
]. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3226 |
^ revision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3227 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3228 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3229 |
Object binaryRevision |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3230 |
Object class binaryRevision |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3231 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3232 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3233 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3234 |
to find all classes which are not up-to-date: |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3235 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3236 |
|classes| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3237 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3238 |
classes := Smalltalk allClasses |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3239 |
select:[:cls | cls binaryRevision notNil and:[cls binaryRevision ~= cls revision]]. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3240 |
SystemBrowser browseClasses:classes title:'classes which are not up-to-date' |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3241 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3242 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3243 |
"Created: 7.12.1995 / 10:58:47 / cg" |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3244 |
"Modified: 9.2.1996 / 17:04:39 / cg" |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3245 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3246 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3247 |
packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3248 |
"return the sourceCodeInfo, which defines the module and the subdirectory |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3249 |
in which the receiver class was built. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3250 |
This info is extracted from the package id (which is added to stc-compiled classes). |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3251 |
This method is to be obsoleted soon, since the same info is now found |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3252 |
in the versionString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3253 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3254 |
The info returned consists of a dictionary |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3255 |
filled with (at least) values at: #module, #directory and #library. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3256 |
If no such info is present in the class, nil is returned. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3257 |
(this happens with autoloaded and filed-in classes) |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3258 |
Auotloaded classes set their package from the revisionInfo, if present. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3259 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3260 |
By convention, this info is encoded in the classes package |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3261 |
string (which is given as argument to stc) as the last word in parenthesis. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3262 |
The info consists of 1 to 3 subcomponents, separated by colons. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3263 |
The first defines the classes module (i.e. some application identifier), |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3264 |
the second defines the subdirectory within that module, the third |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3265 |
defines the name of the class library. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3266 |
If left blank, the module info defaults to 'stx', |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3267 |
the directory info defaults to library name. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3268 |
The library name may not be left blank. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3269 |
(this is done for backward compatibility,) |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3270 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3271 |
For example: |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3272 |
'....(libbasic)' -> module: stx directory: libbasic library: libbasic |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3273 |
'....(stx:libbasic)' -> module: stx directory: libbasic library: libbasic |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3274 |
'....(aeg:libIECInterface)' -> module: aeg directory: libIECInterface library:libIECInterface |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3275 |
'....(stx:goodies/persistency:libdbase)' -> module: stx directory: goodies/persistency library:libdbase |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3276 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3277 |
The way how the sourceCodeManager uses this to find the source location |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3278 |
depends on the scheme used. For CVS, the module is taken as the -d arg, |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3279 |
while the directory is prepended to the file name. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3280 |
Other schemes may do things differently - these are not yet specified. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3281 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3282 |
Caveat: |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3283 |
Encoding this info in the package string seems somewhat kludgy. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3284 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3285 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3286 |
|sourceInfo packageString idx1 idx2 |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3287 |
moduleString directoryString libraryString components| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3288 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3289 |
package isNil ifTrue:[^ nil]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3290 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3291 |
packageString := package asString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3292 |
idx1 := packageString lastIndexOf:$(. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3293 |
idx1 ~~ 0 ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3294 |
idx2 := packageString indexOf:$) startingAt:idx1+1. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3295 |
idx2 ~~ 0 ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3296 |
sourceInfo := packageString copyFrom:idx1 + 1 to:idx2 - 1 |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3297 |
] |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3298 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3299 |
sourceInfo isNil ifTrue:[^ nil]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3300 |
components := sourceInfo asCollectionOfSubstringsSeparatedBy:$:. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3301 |
components size == 0 ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3302 |
moduleString := 'stx'. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3303 |
directoryString := libraryString := ''. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3304 |
^ nil |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3305 |
] ifFalse:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3306 |
components size == 1 ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3307 |
"/ a single name given - the module becomes 'stx', |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3308 |
"/ if the component includes slashes, its the directory |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3309 |
"/ otherwise the library |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3310 |
"/ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3311 |
moduleString := 'stx'. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3312 |
directoryString := libraryString := components at:1. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3313 |
(libraryString includes:$/) ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3314 |
libraryString := libraryString asFilename baseName |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3315 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3316 |
] ifFalse:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3317 |
components size == 2 ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3318 |
"/ two components - assume its the module and the directory; |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3319 |
"/ the library is assumed to be named after the directory |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3320 |
"/ except, if slashes are in the name; then the libraryname |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3321 |
"/ is the last component. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3322 |
"/ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3323 |
moduleString := components at:1. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3324 |
directoryString := libraryString := components at:2. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3325 |
(libraryString includes:$/) ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3326 |
libraryString := libraryString asFilename baseName |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3327 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3328 |
] ifFalse:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3329 |
"/ all components given |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3330 |
moduleString := components at:1. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3331 |
directoryString := components at:2. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3332 |
libraryString := components at:3. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3333 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3334 |
] |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3335 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3336 |
libraryString isEmpty ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3337 |
directoryString notEmpty ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3338 |
libraryString := directoryString asFilename baseName |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3339 |
]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3340 |
libraryString isEmpty ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3341 |
"/ lets extract the library from the liblist file ... |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3342 |
libraryString := Smalltalk libraryFileNameOfClass:self. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3343 |
libraryString isNil ifTrue:[^ nil]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3344 |
] |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3345 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3346 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3347 |
moduleString isEmpty ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3348 |
moduleString := 'stx'. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3349 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3350 |
directoryString isEmpty ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3351 |
directoryString := libraryString. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3352 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3353 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3354 |
^ IdentityDictionary |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3355 |
with:(#module->moduleString) |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3356 |
with:(#directory->directoryString) |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3357 |
with:(#library->libraryString) |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3358 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3359 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3360 |
Object packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3361 |
View packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3362 |
Model packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3363 |
BinaryObjectStorage packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3364 |
MemoryMonitor packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3365 |
ClockView packageSourceCodeInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3366 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3367 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3368 |
"Created: 4.11.1995 / 20:36:53 / cg" |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3369 |
"Modified: 7.2.1996 / 14:26:31 / cg" |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3370 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3371 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3372 |
revision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3373 |
"return the revision-ID of the class which corresponds to the |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3374 |
rcs-id of the source to which this class is equivalent. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3375 |
Initially, this is the same as #binaryRevision; however, once changes have |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3376 |
been checked into a source repository, the binary continues to remain based upon |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3377 |
the old revision, while logically, the class has the new (checked-in) revision. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3378 |
To check if a source corresponds to a compiled binary, compare this |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3379 |
ID with the one returned by #binaryRevision." |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3380 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3381 |
|info| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3382 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3383 |
info := self revisionInfo. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3384 |
info notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3385 |
^ info at:#revision ifAbsent:nil |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3386 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3387 |
^ revision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3388 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3389 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3390 |
Object revision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3391 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3392 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3393 |
"Created: 11.11.1995 / 14:27:20 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3394 |
"Modified: 12.12.1995 / 20:30:20 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3395 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3396 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3397 |
revisionInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3398 |
"return a dictionary filled with revision info. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3399 |
This extracts the relevant info from the revisionString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3400 |
The revisionInfo contains all or a subset of: |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3401 |
#binaryRevision - the revision upon which the binary of this class is based |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3402 |
#revision - the revision upon which the class is based logically |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3403 |
(different, if a changed class was checked in, but not yet recompiled) |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3404 |
#user - the user who checked in the logical revision |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3405 |
#date - the date when the logical revision was checked in |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3406 |
#time - the time when the logical revision was checked in |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3407 |
#fileName - the classes source file name |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3408 |
#repositoryPath - the classes source container |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3409 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3410 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3411 |
|vsnString info| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3412 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3413 |
vsnString := self revisionString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3414 |
vsnString notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3415 |
info := Class revisionInfoFromString:vsnString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3416 |
info notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3417 |
info at:#binaryRevision put:revision. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3418 |
] |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3419 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3420 |
^ info |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3421 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3422 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3423 |
Object revisionString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3424 |
Object revisionInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3425 |
Image revisionInfo |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3426 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3427 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3428 |
"Created: 11.11.1995 / 14:27:20 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3429 |
"Modified: 9.12.1995 / 21:35:26 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3430 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3431 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3432 |
revisionString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3433 |
"return my revision string; that one is extracted from the |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3434 |
classes #version method. Either this is a method returning that string, |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3435 |
or its a comment-only method and the comment defines the version. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3436 |
If the source is not accessable or no such method exists, |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3437 |
nil is returned." |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3438 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3439 |
|cls meta m src val| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3440 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3441 |
thisContext isRecursive ifTrue:[^ nil ]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3442 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3443 |
self isMeta ifTrue:[ |
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3444 |
meta := self. cls := self soleInstance |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3445 |
] ifFalse:[ |
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3446 |
cls := self. meta := self class |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3447 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3448 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3449 |
m := meta compiledMethodAt:#version. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3450 |
m isNil ifTrue:[ |
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3451 |
m := cls compiledMethodAt:#version. |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3452 |
m isNil ifTrue:[^ nil]. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3453 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3454 |
|
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3455 |
m isExecutable ifTrue:[ |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3456 |
"/ |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3457 |
"/ if its a method returning the string, |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3458 |
"/ thats the returned value |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3459 |
"/ |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3460 |
val := cls version. |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3461 |
val isString ifTrue:[^ val]. |
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3462 |
]. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3463 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3464 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3465 |
"/ if its a method consisting of a comment only |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3466 |
"/ extract it - this may lead to a recursive call |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3467 |
"/ to myself (thats what the #isRecursive is for) |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3468 |
"/ in case we need to access the source code manager |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3469 |
"/ for the source ... |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3470 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3471 |
src := m source. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3472 |
src isNil ifTrue:[^ nil]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3473 |
^ self revisionStringFromSource:src |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3474 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3475 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3476 |
Smalltalk allClassesDo:[:cls | |
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3477 |
Transcript showCr:cls revisionString |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3478 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3479 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3480 |
Number revisionString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3481 |
FileDirectory revisionString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3482 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3483 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3484 |
"Created: 29.10.1995 / 19:28:03 / cg" |
1102
6ed4f93420c6
dont call #version if the method has been unloaded
Claus Gittinger <cg@exept.de>
parents:
1063
diff
changeset
|
3485 |
"Modified: 18.3.1996 / 15:39:36 / cg" |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3486 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3487 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3488 |
revisionStringFromSource:aMethodSourceString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3489 |
"extract a revision string from a methods source string" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3490 |
|
986 | 3491 |
|lines| |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3492 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3493 |
lines := aMethodSourceString asCollectionOfLines. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3494 |
lines do:[:l | |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3495 |
|i| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3496 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3497 |
i := l indexOfSubCollection:'$Header: '. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3498 |
i ~~ 0 ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3499 |
^ l copyFrom:i |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3500 |
] |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3501 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3502 |
^ nil |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3503 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3504 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3505 |
setBinaryRevision:aString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3506 |
"set the revision-ID. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3507 |
This should normally not be done in the running system, as the source-manager |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3508 |
will need this to validate sourcefiles being correct for a given binary |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3509 |
(and optionally: extracting the required sourcefile from the rcs source)" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3510 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3511 |
revision := aString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3512 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3513 |
"Created: 9.12.1995 / 17:05:17 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3514 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3515 |
|
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3516 |
setPackageFromRevision |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3517 |
"set my package from the info found in the revisionString if present. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3518 |
This is used to set some useful packageInfo after autoloading |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3519 |
(otherwise, autoloaded classes/methods would go into your current |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3520 |
package - which is probably not a good idea)" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3521 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3522 |
|info mgr dir lib mod p| |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3523 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3524 |
mgr := self sourceCodeManager. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3525 |
mgr notNil ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3526 |
info := mgr sourceInfoOfClass:self |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3527 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3528 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3529 |
info notNil ifTrue:[ |
942
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3530 |
mod := info at:#module ifAbsent:nil. "/ stx, aeg, <your-organization> |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3531 |
dir := info at:#directory ifAbsent:nil. "/ libbasic, libtool ... |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3532 |
lib := info at:#library ifAbsent:dir. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3533 |
|
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3534 |
p := ''. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3535 |
mod notNil ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3536 |
mod ~= 'stx' ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3537 |
p := p , mod |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3538 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3539 |
]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3540 |
dir notNil ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3541 |
p notEmpty ifTrue:[p := p , ':']. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3542 |
p := p , dir. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3543 |
]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3544 |
lib notNil ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3545 |
lib ~= dir ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3546 |
p notEmpty ifTrue:[p := p , ':']. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3547 |
p := p , lib. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3548 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3549 |
]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3550 |
p notEmpty ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3551 |
p := '(' , p , ')'. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3552 |
|
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3553 |
package notNil ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3554 |
(name , ': changing packageID to ''' , p , '''') infoPrintNL. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3555 |
]. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3556 |
package := p. |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3557 |
|
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3558 |
methodArray do:[:aMethod | |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3559 |
aMethod package isNil ifTrue:[ |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3560 |
aMethod package:p |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3561 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3562 |
] |
6c1345674ffa
careful with self-changing selectorArrays when recompiling classes
Claus Gittinger <cg@exept.de>
parents:
937
diff
changeset
|
3563 |
]. |
937
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3564 |
]. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3565 |
^ self |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3566 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3567 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3568 |
MemoryMonitor autoload. |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3569 |
MemoryMonitor setPackageFromRevision |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3570 |
" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3571 |
|
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3572 |
"Modified: 7.2.1996 / 14:36:48 / cg" |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3573 |
! |
f2243cbb7ae0
set package info when autoloading; flush cachedClasses when unloading
Claus Gittinger <cg@exept.de>
parents:
934
diff
changeset
|
3574 |
|
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3575 |
sourceStream |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3576 |
"return an open stream on my sourcefile, nil if that is not available" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3577 |
|
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3578 |
|source cls| |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3579 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3580 |
self isMeta ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3581 |
cls := self soleInstance |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3582 |
] ifFalse:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3583 |
cls := self |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3584 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3585 |
classFilename notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3586 |
source := classFilename |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3587 |
] ifFalse:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3588 |
source := (Smalltalk fileNameForClass:cls) , '.st' |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3589 |
]. |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3590 |
^ cls sourceStreamFor:source |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3591 |
! |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3592 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3593 |
sourceStreamFor:source |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3594 |
"return an open stream on a sourcefile, nil if that is not available" |
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3595 |
|
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3596 |
|fileName aStream mgr| |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3597 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3598 |
"/ |
892
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
3599 |
"/ if there is no SourceCodeManager, |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
3600 |
"/ or TryLocalSourceFirst is true, |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
3601 |
"/ look in standard places first |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3602 |
"/ |
892
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
3603 |
((mgr := self sourceCodeManager) isNil |
2b680edcd115
optionally allow localSources to override sourceManager files
Claus Gittinger <cg@exept.de>
parents:
888
diff
changeset
|
3604 |
or:[TryLocalSourceFirst == true]) ifTrue:[ |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3605 |
fileName := Smalltalk getSourceFileName:source. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3606 |
fileName notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3607 |
aStream := fileName asFilename readStream. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3608 |
] |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3609 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3610 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3611 |
aStream isNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3612 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3613 |
"/ hard case - there is no source file for this class |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3614 |
"/ (in the source-dir-path). |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3615 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3616 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3617 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3618 |
"/ look if my binary is from a dynamically loaded module, |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3619 |
"/ and, if so, look in the modules directory for the |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3620 |
"/ source file. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3621 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3622 |
ObjectFileLoader notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3623 |
ObjectFileLoader loadedObjectHandlesDo:[:h | |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3624 |
|f classes| |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3625 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3626 |
aStream isNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3627 |
(classes := h classes) notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3628 |
(classes includes:self) ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3629 |
f := h pathName. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3630 |
f := f asFilename directory. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3631 |
f := f construct:source. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3632 |
f exists ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3633 |
aStream := f readStream. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3634 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3635 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3636 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3637 |
] |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3638 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3639 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3640 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3641 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3642 |
aStream isNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3643 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3644 |
"/ mhmh - still no source file. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3645 |
"/ If there is a SourceCodeManager, ask it to aquire the |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3646 |
"/ the source for my class, and return an open stream on it. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3647 |
"/ if that one does not know about the source, look in |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3648 |
"/ standard places |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3649 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3650 |
mgr notNil ifTrue:[ |
953
a3c14f2bf1e9
metaclasses return a valid binaryRevision, too
Claus Gittinger <cg@exept.de>
parents:
944
diff
changeset
|
3651 |
aStream := mgr sourceStreamFor:self. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3652 |
aStream isNil ifTrue:[ |
888 | 3653 |
fileName := Smalltalk getSourceFileName:source. |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3654 |
fileName notNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3655 |
aStream := fileName asFilename readStream. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3656 |
] |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3657 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3658 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3659 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3660 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3661 |
"/ final chance: try current directory |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3662 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3663 |
aStream isNil ifTrue:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3664 |
aStream := source asFilename readStream. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3665 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3666 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3667 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3668 |
^ aStream |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3669 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3670 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3671 |
Object sourceStream |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3672 |
Clock sourceStream |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3673 |
Autoload sourceStream |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3674 |
" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3675 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3676 |
"Created: 10.11.1995 / 21:05:13 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3677 |
"Modified: 7.12.1995 / 13:21:16 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3678 |
! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3679 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3680 |
updateVersionMethodFor:newRevisionString |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3681 |
"helper for the checkin procedure. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3682 |
Update my #version method, to now return newRevisionString." |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3683 |
|
986 | 3684 |
|cls "vs m mgr"| |
773
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3685 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3686 |
cls := self. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3687 |
self isMeta ifFalse:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3688 |
cls := self class |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3689 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3690 |
"/ m := cls compiledMethodAt:#version. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3691 |
"/ m isNil ifTrue:[^ false]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3692 |
"/ vs := self revisionString. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3693 |
"/ vs isNil ifTrue:[^ false]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3694 |
"/ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3695 |
"/ (mgr := self sourceCodeManager) isNil ifTrue:[^ false]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3696 |
"/ newString := mgr updatedRevisionStringOf:cls forRevision:newRevision with:vs. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3697 |
"/ newString isNil ifTrue:[^ false]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3698 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3699 |
Class withoutUpdatingChangesDo:[ |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3700 |
Compiler compile:'version |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3701 |
^ ''' , newRevisionString , ''' |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3702 |
' |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3703 |
forClass:cls inCategory:#documentation notifying:nil |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3704 |
install:true skipIfSame:false silent:true. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3705 |
]. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3706 |
"/ ('updated to :' , newRevisionString) printNL. |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3707 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3708 |
^ true |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3709 |
|
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3710 |
"Created: 7.12.1995 / 20:42:22 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3711 |
"Modified: 7.12.1995 / 23:34:43 / cg" |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3712 |
! ! |
1ff2f5af29cc
category changes / return proper sourceManager, even if access is disabled (in Launchers setting box)
Claus Gittinger <cg@exept.de>
parents:
767
diff
changeset
|
3713 |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3714 |
!Class methodsFor:'subclass creation'! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3715 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3716 |
subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
453 | 3717 |
"create a new class as a subclass of an existing class (the receiver). |
3718 |
The subclass will have indexed variables if the receiving-class has." |
|
3719 |
||
3720 |
self isVariable ifFalse:[ |
|
3721 |
^ self class |
|
3722 |
name:t |
|
897 | 3723 |
inEnvironment:(Smalltalk currentNameSpace) |
453 | 3724 |
subclassOf:self |
3725 |
instanceVariableNames:f |
|
3726 |
variable:false |
|
3727 |
words:true |
|
3728 |
pointers:true |
|
3729 |
classVariableNames:d |
|
3730 |
poolDictionaries:s |
|
3731 |
category:cat |
|
3732 |
comment:nil |
|
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3733 |
changed:true |
453 | 3734 |
]. |
3735 |
self isBytes ifTrue:[ |
|
3736 |
^ self |
|
3737 |
variableByteSubclass:t |
|
3738 |
instanceVariableNames:f |
|
3739 |
classVariableNames:d |
|
3740 |
poolDictionaries:s |
|
3741 |
category:cat |
|
3742 |
]. |
|
3743 |
self isLongs ifTrue:[ |
|
3744 |
^ self |
|
3745 |
variableLongSubclass:t |
|
3746 |
instanceVariableNames:f |
|
3747 |
classVariableNames:d |
|
3748 |
poolDictionaries:s |
|
3749 |
category:cat |
|
3750 |
]. |
|
3751 |
self isFloats ifTrue:[ |
|
3752 |
^ self |
|
3753 |
variableFloatSubclass:t |
|
3754 |
instanceVariableNames:f |
|
3755 |
classVariableNames:d |
|
3756 |
poolDictionaries:s |
|
3757 |
category:cat |
|
3758 |
]. |
|
3759 |
self isDoubles ifTrue:[ |
|
3760 |
^ self |
|
3761 |
variableDoubleSubclass:t |
|
3762 |
instanceVariableNames:f |
|
3763 |
classVariableNames:d |
|
3764 |
poolDictionaries:s |
|
3765 |
category:cat |
|
3766 |
]. |
|
3767 |
self isWords ifTrue:[ |
|
3768 |
^ self |
|
3769 |
variableWordSubclass:t |
|
3770 |
instanceVariableNames:f |
|
3771 |
classVariableNames:d |
|
3772 |
poolDictionaries:s |
|
3773 |
category:cat |
|
3774 |
]. |
|
3775 |
^ self |
|
3776 |
variableSubclass:t |
|
3777 |
instanceVariableNames:f |
|
3778 |
classVariableNames:d |
|
3779 |
poolDictionaries:s |
|
3780 |
category:cat |
|
3781 |
! |
|
3782 |
||
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3783 |
variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3784 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3785 |
in which the subclass has indexable byte-sized nonpointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3786 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3787 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3788 |
self isBytes ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3789 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3790 |
'cannot make a variable byte subclass of a variable non-byte class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3791 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3792 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3793 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3794 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3795 |
name:t |
897 | 3796 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3797 |
subclassOf:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3798 |
instanceVariableNames:f |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3799 |
variable:true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3800 |
words:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3801 |
pointers:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3802 |
classVariableNames:d |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3803 |
poolDictionaries:s |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3804 |
category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3805 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3806 |
changed:true |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3807 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3808 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3809 |
variableDoubleSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3810 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3811 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3812 |
in which the subclass has indexable double-sized nonpointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3813 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3814 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3815 |
self isDoubles ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3816 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3817 |
'cannot make a variable double subclass of a variable non-double class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3818 |
]. |
453 | 3819 |
]. |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3820 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3821 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3822 |
name:t |
897 | 3823 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3824 |
subclassOf:self |
453 | 3825 |
instanceVariableNames:f |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3826 |
variable:#double |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3827 |
words:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3828 |
pointers:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3829 |
classVariableNames:d |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3830 |
poolDictionaries:s |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3831 |
category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3832 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3833 |
changed:true |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3834 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3835 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3836 |
variableFloatSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3837 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3838 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3839 |
in which the subclass has indexable float-sized nonpointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3840 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3841 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3842 |
self isFloats ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3843 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3844 |
'cannot make a variable float subclass of a variable non-float class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3845 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3846 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3847 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3848 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3849 |
name:t |
897 | 3850 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3851 |
subclassOf:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3852 |
instanceVariableNames:f |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3853 |
variable:#float |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3854 |
words:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3855 |
pointers:false |
453 | 3856 |
classVariableNames:d |
3857 |
poolDictionaries:s |
|
3858 |
category:cat |
|
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3859 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3860 |
changed:true |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3861 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3862 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3863 |
variableLongSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3864 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3865 |
in which the subclass has indexable long-sized nonpointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3866 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3867 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3868 |
self isLongs ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3869 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3870 |
'cannot make a variable long subclass of a variable non-long class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3871 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3872 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3873 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3874 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3875 |
name:t |
897 | 3876 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3877 |
subclassOf:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3878 |
instanceVariableNames:f |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3879 |
variable:#long |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3880 |
words:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3881 |
pointers:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3882 |
classVariableNames:d |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3883 |
poolDictionaries:s |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3884 |
category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3885 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3886 |
changed:true |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3887 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3888 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3889 |
variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3890 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3891 |
in which the subclass has indexable pointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3892 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3893 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3894 |
self isPointers ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3895 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3896 |
'cannot make a variable pointer subclass of a variable non-pointer class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3897 |
] |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3898 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3899 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3900 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3901 |
name:t |
897 | 3902 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3903 |
subclassOf:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3904 |
instanceVariableNames:f |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3905 |
variable:true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3906 |
words:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3907 |
pointers:true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3908 |
classVariableNames:d |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3909 |
poolDictionaries:s |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3910 |
category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3911 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3912 |
changed:true |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3913 |
! |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3914 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3915 |
variableWordSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3916 |
"create a new class as a subclass of an existing class (the receiver) |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3917 |
in which the subclass has indexable word-sized nonpointer variables" |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3918 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3919 |
self isVariable ifTrue:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3920 |
self isWords ifFalse:[ |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3921 |
^ self error: |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3922 |
'cannot make a variable word subclass of a variable non-word class' |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3923 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3924 |
]. |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3925 |
|
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3926 |
^ self class |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3927 |
name:t |
897 | 3928 |
inEnvironment:(Smalltalk currentNameSpace) |
557
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3929 |
subclassOf:self |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3930 |
instanceVariableNames:f |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3931 |
variable:true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3932 |
words:true |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3933 |
pointers:false |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3934 |
classVariableNames:d |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3935 |
poolDictionaries:s |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3936 |
category:cat |
0d93da4afc03
previous was corrupted by a wrong checkin ...
Claus Gittinger <cg@exept.de>
parents:
556
diff
changeset
|
3937 |
comment:nil |
906
1ff45713ce4e
dont write change records when reading binary classes
Claus Gittinger <cg@exept.de>
parents:
902
diff
changeset
|
3938 |
changed:true |
2 | 3939 |
! ! |
453 | 3940 |
|
662 | 3941 |
!Class class methodsFor:'documentation'! |
3942 |
||
3943 |
version |
|
1113
840b03d131d7
category changes; lock changeFileUpdates via a semaphore (for slow background checkins)
Claus Gittinger <cg@exept.de>
parents:
1107
diff
changeset
|
3944 |
^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.147 1996-03-21 15:33:40 cg Exp $' |
708
ba92b2a8477d
include classes checkin revision in checkin-change-record
Claus Gittinger <cg@exept.de>
parents:
707
diff
changeset
|
3945 |
! ! |
453 | 3946 |
Class initialize! |