author | Claus Gittinger <cg@exept.de> |
Mon, 13 Feb 2006 23:04:27 +0100 | |
changeset 1674 | 942a9a3acfc9 |
parent 1637 | 993d58b1789b |
child 1693 | b6ac1ae4e625 |
permissions | -rw-r--r-- |
2 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
49 | 3 |
All Rights Reserved |
2 | 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 |
||
1081 | 13 |
"{ Package: 'stx:libcomp' }" |
14 |
||
141 | 15 |
Parser subclass:#Explainer |
263 | 16 |
instanceVariableNames:'' |
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-Compiler' |
|
2 | 20 |
! |
21 |
||
396 | 22 |
!Explainer class methodsFor:'documentation'! |
2 | 23 |
|
20 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
49 | 27 |
All Rights Reserved |
20 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
2 | 38 |
documentation |
39 |
" |
|
20 | 40 |
a very simple explainer - much more should be added ... |
41 |
This one is involved, when the 'explain' function is used in a |
|
84 | 42 |
codeView (popup or via CMD-E). |
263 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
2 | 46 |
" |
47 |
! ! |
|
48 |
||
396 | 49 |
!Explainer class methodsFor:'explaining'! |
2 | 50 |
|
1316
30806ca08095
commonSuperClassOf: - allow for classes and names in arg
Claus Gittinger <cg@exept.de>
parents:
1289
diff
changeset
|
51 |
commonSuperClassOf:listOfClassesOrClassNames |
1637 | 52 |
^ Behavior commonSuperclassOf:listOfClassesOrClassNames |
141 | 53 |
! |
54 |
||
2 | 55 |
explain:someText in:source forClass:aClass |
6 | 56 |
"Given a source and a substring of it, return a string containing |
57 |
an explanation. |
|
49 | 58 |
This is just a q&d implementation - to be correct, it should use the parser, |
59 |
and explain from the parsetree (instead of doing string matches). |
|
60 |
This leads to some wrong explanations, for example if some string is |
|
839 | 61 |
used as selector within a string, or if a variable is named like a |
62 |
message selector. I.e. the explanation should be context sensitive. |
|
49 | 63 |
Also, there could be much more detailed explanations." |
2 | 64 |
|
1183 | 65 |
^ self |
66 |
explain:someText in:source forClass:aClass short:false |
|
67 |
! |
|
68 |
||
69 |
explain:someText in:source forClass:aClass short:shortText |
|
70 |
"Given a source and a substring of it, return a string containing |
|
71 |
an explanation. |
|
72 |
This is just a q&d implementation - to be correct, it should use the parser, |
|
73 |
and explain from the parsetree (instead of doing string matches). |
|
74 |
This leads to some wrong explanations, for example if some string is |
|
75 |
used as selector within a string, or if a variable is named like a |
|
76 |
message selector. I.e. the explanation should be context sensitive. |
|
77 |
Also, there could be much more detailed explanations." |
|
78 |
||
1159 | 79 |
|parser variables c string tmp |
1289 | 80 |
spc sym sel stringText clsName val valString| |
2 | 81 |
|
675 | 82 |
string := someText string withoutSeparators. |
1198 | 83 |
stringText := string allBold. |
1233 | 84 |
stringText := '''' , stringText , ''''. |
49 | 85 |
|
86 |
" |
|
87 |
ask parser for variable names |
|
88 |
" |
|
1357 | 89 |
ParseErrorSignal catch:[ |
90 |
parser := self parseMethod:source in:aClass ignoreErrors:true ignoreWarnings:true. |
|
91 |
]. |
|
2 | 92 |
parser notNil ifTrue:[ |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
93 |
"look for variables" |
2 | 94 |
|
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
95 |
variables := parser methodVars. |
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
96 |
(variables notNil and:[variables includes:string]) ifTrue:[ |
1233 | 97 |
^ stringText , ' is a method variable.' |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
98 |
]. |
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
99 |
variables := parser methodArgs. |
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
100 |
(variables notNil and:[variables includes:string]) ifTrue:[ |
1233 | 101 |
^ stringText , ' is a method argument.' |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
102 |
] |
2 | 103 |
]. |
49 | 104 |
|
2 | 105 |
parser isNil ifTrue:[ |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
106 |
parser := self for:(ReadStream on:source) in:aClass |
2 | 107 |
]. |
108 |
||
109 |
"instvars" |
|
84 | 110 |
c := aClass whichClassDefinesInstVar:string. |
111 |
c notNil ifTrue:[ |
|
396 | 112 |
c isMeta ifTrue:[ |
1211
91e94e294819
isMeta/soleInstance -> theMetaclass / theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
1210
diff
changeset
|
113 |
clsName := c theNonMetaclass name. |
1198 | 114 |
shortText ifTrue:[ |
1233 | 115 |
^ stringText , ' is a class instVar in ' , clsName , '.' |
1198 | 116 |
]. |
1233 | 117 |
^ stringText, ' is a class instance variable in ' , clsName , '.' |
396 | 118 |
]. |
119 |
||
1233 | 120 |
clsName := c name. |
1198 | 121 |
shortText ifTrue:[ |
1233 | 122 |
^ stringText , ' is an instVar in ' , clsName , '.' |
1198 | 123 |
]. |
1233 | 124 |
^ stringText , ' is an instance variable in ' , clsName , '.' |
2 | 125 |
]. |
126 |
||
84 | 127 |
"/ variables := aClass allInstVarNames. |
128 |
"/ (variables notNil and:[variables includes:string]) ifTrue:[ |
|
129 |
"/ "where is it" |
|
130 |
"/ c := aClass. |
|
1159 | 131 |
"/ [c notNil] whileTrue:[ |v| |
84 | 132 |
"/ v := c instVarNames. |
133 |
"/ (v notNil and:[v includes:string]) ifTrue:[ |
|
134 |
"/ ^ string , ' is an instance variable in ' , c name |
|
135 |
"/ ]. |
|
136 |
"/ c := c superclass |
|
137 |
"/ ]. |
|
138 |
"/ self error:'oops' |
|
139 |
"/ ]. |
|
140 |
||
442 | 141 |
"/ "class instvars" |
142 |
"/ variables := aClass class allInstVarNames. |
|
143 |
"/ (variables notNil and:[variables includes:string]) ifTrue:[ |
|
144 |
"/ "where is it" |
|
145 |
"/ c := aClass. |
|
1159 | 146 |
"/ [c notNil] whileTrue:[ |v| |
442 | 147 |
"/ v := c class instVarNames. |
148 |
"/ (v notNil and:[v includes:string]) ifTrue:[ |
|
149 |
"/ ^ string , ' is a class instance variable in ' , c name |
|
150 |
"/ ]. |
|
151 |
"/ c := c superclass |
|
152 |
"/ ]. |
|
153 |
"/ self error:'oops' |
|
154 |
"/ ]. |
|
2 | 155 |
|
156 |
"classvars" |
|
157 |
c := parser inWhichClassIsClassVar:string. |
|
158 |
c notNil ifTrue:[ |
|
1233 | 159 |
clsName := c name. |
1198 | 160 |
shortText ifTrue:[ |
1289 | 161 |
stringText := stringText , ' is a classVar in ' , clsName |
162 |
] ifFalse:[ |
|
163 |
stringText := stringText , ' is a class variable in ' , clsName |
|
1198 | 164 |
]. |
1289 | 165 |
val := Smalltalk at:(clsName , ':' , string) asSymbol. |
166 |
(val isBoolean or:[val isNil or:[val isSymbol]]) ifTrue:[ |
|
167 |
valString := val storeString. |
|
168 |
] ifFalse:[ |
|
169 |
valString := val classNameWithArticle. |
|
170 |
]. |
|
171 |
^ stringText , ' (' , valString , ').' |
|
2 | 172 |
]. |
173 |
||
1210
e3174ccbb5bb
isMeta/soleInstance -> theMetaclass / theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
174 |
c := aClass theNonMetaclass. |
509
d8475399ca3e
Correct handling of private classes.
Stefan Vogel <sv@exept.de>
parents:
503
diff
changeset
|
175 |
c privateClasses do:[:pClass | |
d8475399ca3e
Correct handling of private classes.
Stefan Vogel <sv@exept.de>
parents:
503
diff
changeset
|
176 |
(pClass name = string |
d8475399ca3e
Correct handling of private classes.
Stefan Vogel <sv@exept.de>
parents:
503
diff
changeset
|
177 |
or:[pClass nameWithoutPrefix = string]) ifTrue:[ |
1233 | 178 |
string := stringText , ' is a private class in ''' , c name , '''.'. |
179 |
shortText ifFalse:[ |
|
1183 | 180 |
string := (string , '\\It is only visible locally.') withCRs |
181 |
]. |
|
182 |
^ string withCRs |
|
422 | 183 |
]. |
184 |
]. |
|
185 |
||
456 | 186 |
(spc := aClass nameSpace) notNil ifTrue:[ |
796 | 187 |
sym := (spc name , '::' , string) asSymbolIfInterned. |
188 |
sym notNil ifTrue:[ |
|
189 |
(Smalltalk at:sym) isBehavior ifTrue:[ |
|
1233 | 190 |
string := stringText , ' is a class in the ''' , spc name , ''' nameSpace.'. |
1183 | 191 |
shortText ifFalse:[ |
192 |
string := (string |
|
796 | 193 |
, '\\It is only visible within this nameSpace.' |
194 |
, '\Access from the outside is possible' |
|
195 |
, '\by the special name ''' , spc name , '::' , string , '''.') withCRs |
|
1183 | 196 |
]. |
197 |
^ string withCRs |
|
796 | 198 |
]. |
422 | 199 |
]. |
200 |
]. |
|
201 |
||
796 | 202 |
"/ string knownAsSymbol ifTrue:[ |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
203 |
"globals & symbols" |
2 | 204 |
|
1183 | 205 |
tmp := self explainKnownSymbol:string inClass:aClass short:shortText. |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
206 |
tmp notNil ifTrue:[ ^ tmp]. |
839 | 207 |
|
208 |
"/ try with added colon ... |
|
209 |
sel := string , ':'. |
|
210 |
Symbol allInstancesDo:[:sym | |
|
211 |
(sym startsWith:sel) ifTrue:[ |
|
1183 | 212 |
tmp := self explainKnownSymbol:sym inClass:aClass short:shortText. |
839 | 213 |
tmp notNil ifTrue:[ ^ tmp]. |
214 |
] |
|
215 |
]. |
|
796 | 216 |
"/ ]. |
2 | 217 |
|
218 |
"try for some obvious things" |
|
1183 | 219 |
tmp := self explainPseudoVariable:string in:aClass short:true. |
2 | 220 |
tmp notNil ifTrue:[ ^ tmp]. |
221 |
||
222 |
"try syntax ..." |
|
223 |
||
1183 | 224 |
tmp := self explainSyntax:string short:shortText. |
49 | 225 |
tmp notNil ifTrue:[ ^ tmp]. |
20 | 226 |
|
1183 | 227 |
shortText ifTrue:[ |
1438 | 228 |
^ 'no explanation' |
1183 | 229 |
]. |
230 |
||
2 | 231 |
parser isNil ifTrue:[ |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
232 |
^ 'parse error - no explanation' |
2 | 233 |
]. |
796 | 234 |
^ 'cannot explain this (could not figure out what this is).' |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
235 |
|
675 | 236 |
"Created: / 3.12.1995 / 12:47:37 / cg" |
237 |
"Modified: / 16.4.1997 / 12:46:11 / stefan" |
|
1211
91e94e294819
isMeta/soleInstance -> theMetaclass / theNonMetaclass
Claus Gittinger <cg@exept.de>
parents:
1210
diff
changeset
|
238 |
"Modified: / 5.11.2001 / 16:54:23 / cg" |
2 | 239 |
! |
240 |
||
1188 | 241 |
explainGlobal:string inClass:aClass short:shortText |
1183 | 242 |
"return explanation or nil" |
243 |
||
1245 | 244 |
|sym stringText tmp val classCategory| |
141 | 245 |
|
1245 | 246 |
"if not even known as key, its definitely not a global" |
247 |
sym := string asSymbolIfInterned. |
|
796 | 248 |
sym isNil ifTrue:[^ nil]. |
141 | 249 |
|
250 |
"try globals" |
|
1245 | 251 |
(Smalltalk includesKey:sym) ifFalse:[ ^ nil]. |
141 | 252 |
|
1198 | 253 |
stringText := string allBold. |
254 |
||
1245 | 255 |
"/ stringText := '''' , stringText , ''''. |
256 |
tmp := stringText , ' is a global variable.'. |
|
1183 | 257 |
|
1245 | 258 |
val := Smalltalk at:sym. |
259 |
val isBehavior ifTrue:[ |
|
260 |
"/ a class |
|
1331 | 261 |
val isNameSpace ifTrue:[ |
1330 | 262 |
^ stringText , ' is a namespace.' |
263 |
]. |
|
264 |
||
265 |
classCategory := val category ? 'uncategorized'. |
|
1245 | 266 |
shortText ifTrue:[ |
267 |
^ stringText , ' is ' , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded']) |
|
268 |
, ' class in the ''' , classCategory , ''' category.'. |
|
269 |
]. |
|
270 |
||
271 |
val name = string ifTrue:[ |
|
1183 | 272 |
tmp := tmp , ' |
1245 | 273 |
' , string , ' is ' , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded']) |
274 |
, ' class categorized as ' , classCategory , ' |
|
275 |
in the ''' , val package , ''' package.'. |
|
1183 | 276 |
^ tmp. |
277 |
]. |
|
141 | 278 |
|
1183 | 279 |
tmp := tmp , ' |
280 |
||
1245 | 281 |
' , string , ' is bound to the class ' , val name , |
282 |
' in the ''' , classCategory , ''' category.'. |
|
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
283 |
^ tmp. |
141 | 284 |
]. |
285 |
||
1245 | 286 |
shortText ifTrue:[ |
1674 | 287 |
val isNil ifTrue:[ |
288 |
^ stringText , ' is a global, currently nil.'. |
|
289 |
]. |
|
1245 | 290 |
^ stringText , ' is a global, currently bound to ''' , val classNameWithArticle , '''.'. |
291 |
]. |
|
292 |
tmp := tmp , ' |
|
293 |
||
294 |
Its current value is ''' , val classNameWithArticle , '''.'. |
|
295 |
^ tmp. |
|
1188 | 296 |
! |
297 |
||
298 |
explainHereIn:aClass |
|
299 |
^ 'like self, here refers to the object which received the message. |
|
300 |
||
301 |
However, when sending a message to here the search for methods |
|
302 |
implementing this message will start in the defining class (' , aClass name , ') |
|
303 |
instead of the receivers class (' , aClass name , ' or subclass). |
|
304 |
Thus, using here, redefined methods will NOT be reached with a here-send.' |
|
305 |
! |
|
306 |
||
307 |
explainKnownSymbol:string inClass:aClass |
|
308 |
"return explanation or nil" |
|
309 |
||
310 |
^ self explainKnownSymbol:string inClass:aClass short:false |
|
311 |
! |
|
312 |
||
313 |
explainKnownSymbol:string inClass:aClass short:shortText |
|
314 |
"return explanation or nil" |
|
315 |
||
316 |
|sym| |
|
317 |
||
318 |
sym := string asSymbolIfInterned. |
|
319 |
sym isNil ifTrue:[^ nil]. |
|
320 |
||
321 |
"try globals" |
|
322 |
||
323 |
(Smalltalk includesKey:sym) ifTrue:[ |
|
324 |
^ self explainGlobal:string inClass:aClass short:shortText |
|
325 |
]. |
|
326 |
||
327 |
^ self explainSelector:string inClass:aClass short:shortText |
|
328 |
! |
|
329 |
||
330 |
explainPseudoVariable:string in:aClass |
|
331 |
"return explanation for the pseudoVariables self, super etc." |
|
332 |
||
333 |
^ self explainPseudoVariable:string in:aClass short:false |
|
334 |
! |
|
335 |
||
336 |
explainPseudoVariable:string in:aClass short:shortText |
|
337 |
"return explanation for the pseudoVariables self, super etc." |
|
338 |
||
339 |
(string = 'self') ifTrue:[ |
|
340 |
^ self explainSelfIn:aClass short:shortText |
|
341 |
]. |
|
342 |
||
343 |
(string = 'super') ifTrue:[ |
|
344 |
shortText ifTrue:[ |
|
345 |
^ '''super'' - message lookup starts in superclass ''' , aClass superclass name , '''.' |
|
346 |
]. |
|
347 |
^ self explainSuperIn:aClass short:shortText |
|
348 |
]. |
|
349 |
||
350 |
(string = 'here') ifTrue:[ |
|
351 |
shortText ifTrue:[ |
|
352 |
^ '''here'' - message lookup always starts in ''' , aClass name , '''.' |
|
353 |
]. |
|
354 |
^ self explainHereIn:aClass |
|
355 |
]. |
|
356 |
||
357 |
(string = 'thisContext') ifTrue:[ |
|
358 |
shortText ifTrue:[ |
|
359 |
^ '''thisContext'' - the current stack frame as an object.' |
|
360 |
]. |
|
361 |
^ 'thisContext is a pseudo variable (i.e. it is built in). |
|
362 |
||
363 |
ThisContext always refers to the context object for the currently executed method or |
|
364 |
block (an instance of Context or BlockContext respectively). The calling chain and calling |
|
365 |
receivers/selectors can be accessed via thisContext.' |
|
366 |
]. |
|
367 |
||
368 |
(string = 'true') ifTrue:[ |
|
369 |
shortText ifTrue:[ |
|
370 |
^ '''true'' - the truth and nothing but the truth.' |
|
371 |
]. |
|
372 |
^ 'true is a pseudo variable (i.e. it is built in). |
|
373 |
||
374 |
True represents logical truth. It is the one and only instance of class True.' |
|
375 |
]. |
|
376 |
||
377 |
(string = 'false') ifTrue:[ |
|
378 |
shortText ifTrue:[ |
|
379 |
^ '''false'' - obvisously not true.' |
|
380 |
]. |
|
381 |
^ 'false is a pseudo variable (i.e. it is built in). |
|
382 |
||
383 |
False represents logical falseness. It is the one and only instance of class False.' |
|
384 |
]. |
|
385 |
||
386 |
(string = 'nil') ifTrue:[ |
|
387 |
shortText ifTrue:[ |
|
388 |
^ '''nil'' - undefined, unknown, void or dont care.' |
|
389 |
]. |
|
390 |
^ 'nil is a pseudo variable (i.e. it is built in). |
|
391 |
||
392 |
Nil is used for unitialized variables (among other uses). |
|
393 |
Nil is the one and only instance of class UndefinedObject.' |
|
394 |
]. |
|
395 |
^ nil |
|
396 |
! |
|
397 |
||
398 |
explainSelector:string inClass:aClass short:shortText |
|
399 |
"return explanation or nil" |
|
400 |
||
1352 | 401 |
|sym list count tmp commonSuperClass s s2 |
1188 | 402 |
firstImplementingClass cm msg t| |
403 |
||
404 |
sym := string asSymbolIfInterned. |
|
405 |
sym isNil ifTrue:[^ nil]. |
|
406 |
||
141 | 407 |
" |
408 |
try selectors |
|
409 |
look who implements it |
|
410 |
" |
|
411 |
list := Set new. |
|
1081 | 412 |
Smalltalk allClassesDo:[:c| |
1249
780b4a1a3967
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1245
diff
changeset
|
413 |
(c includesSelector:sym) ifTrue:[ |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
414 |
list add:(c name). |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
415 |
firstImplementingClass isNil ifTrue:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
416 |
firstImplementingClass := c |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
417 |
] |
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
418 |
]. |
1249
780b4a1a3967
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1245
diff
changeset
|
419 |
(c class includesSelector:sym) ifTrue:[ |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
420 |
list add:(c name , ' class'). |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
421 |
firstImplementingClass isNil ifTrue:[ |
912 | 422 |
firstImplementingClass := c class |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
423 |
] |
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
424 |
] |
141 | 425 |
]. |
426 |
||
835 | 427 |
(aClass canUnderstand:sym) ifTrue:[ |
1428 | 428 |
s2 := ('Instances of ''' , aClass name , ''' respond to #') , sym allBold , '.'. |
1184 | 429 |
shortText ifFalse:[ |
430 |
s2 := '\\' , s2 |
|
431 |
, '\- inherited from ' withCRs |
|
1428 | 432 |
, (aClass whichClassImplements:sym) name allBold. |
1184 | 433 |
]. |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
434 |
firstImplementingClass := (aClass whichClassImplements:sym) |
835 | 435 |
] ifFalse:[ |
436 |
s2 := ''. |
|
437 |
]. |
|
438 |
||
141 | 439 |
count := list size. |
440 |
(count ~~ 0) ifTrue:[ |
|
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
441 |
" |
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
442 |
for up-to 4 implementing classes, |
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
443 |
list them |
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
444 |
" |
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
445 |
list := list asOrderedCollection sort. |
1185 | 446 |
shortText ifTrue:[ |
447 |
tmp := ' is implemented in '. |
|
448 |
] ifFalse:[ |
|
449 |
tmp := ' is a selector implemented in '. |
|
450 |
]. |
|
1428 | 451 |
s := '#' , string allBold. |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
452 |
|
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
453 |
(count == 1) ifTrue:[ |
1183 | 454 |
(t := list first) isMeta ifTrue:[ |
455 |
t := 'the ' , t |
|
456 |
]. |
|
1184 | 457 |
msg := s , tmp , t , '.'. |
458 |
shortText ifFalse:[ |
|
459 |
msg := msg , s2. |
|
460 |
] |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
461 |
] ifFalse:[ |
1185 | 462 |
(count == 2) ifTrue:[ |
463 |
msg := s , tmp , (list at:1) , ' and ' , (list at:2) , '.'. |
|
464 |
shortText ifFalse:[ |
|
465 |
msg := msg , s2. |
|
466 |
]. |
|
467 |
] ifFalse:[ |
|
468 |
shortText ifTrue:[ |
|
1428 | 469 |
msg := s , tmp , count printString , ' classes'. |
1637 | 470 |
commonSuperClass := Class commonSuperclassOf:list. |
1428 | 471 |
(commonSuperClass == Object |
472 |
and:[commonSuperClass includesSelector:sym]) ifTrue:[ |
|
473 |
msg := msg , ' (including ' , 'Object' allBold, ')' |
|
474 |
]. |
|
475 |
msg := msg , '.'. |
|
1185 | 476 |
^ msg |
477 |
]. |
|
1183 | 478 |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
479 |
(count == 3) ifTrue:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
480 |
msg := s , tmp , ' |
835 | 481 |
' , (list at:1) , ', ' , (list at:2) , ' and ' , (list at:3) , '.' , s2 |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
482 |
] ifFalse:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
483 |
(count == 4) ifTrue:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
484 |
msg := s , tmp , ' |
835 | 485 |
' , (list at:1) , ', ' , (list at:2) , ', ' , (list at:3), ' and ' , (list at:4) , '.' , s2 |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
486 |
] ifFalse:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
487 |
" |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
488 |
if there are more, look for a common |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
489 |
superclass and show it ... |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
490 |
" |
1637 | 491 |
commonSuperClass := Behavior commonSuperclassOf:list. |
913 | 492 |
(commonSuperClass ~~ Object |
493 |
and:[commonSuperClass ~~ Behavior |
|
494 |
and:[commonSuperClass ~~ Class |
|
495 |
and:[commonSuperClass ~~ ClassDescription]]]) ifTrue:[ |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
496 |
(list includes:commonSuperClass) ifTrue:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
497 |
msg := s . tmp , count printString , commonSuperClass name |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
498 |
, ' and redefined in ' , (count - 1) printString |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
499 |
, ' subclasses' |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
500 |
, s2. |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
501 |
firstImplementingClass := commonSuperClass |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
502 |
] ifFalse:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
503 |
msg := s , tmp, count printString , ' subclasses of ' , commonSuperClass name , s2 |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
504 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
505 |
] ifFalse:[ |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
506 |
(commonSuperClass == Object |
1249
780b4a1a3967
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1245
diff
changeset
|
507 |
and:[commonSuperClass includesSelector:sym]) ifTrue:[ |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
508 |
msg := s , tmp , count printString , ' classes. |
834 | 509 |
|
510 |
All objects seem to respond to that message, |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
511 |
since there is an implementation in Object.' , s2. |
141 | 512 |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
513 |
firstImplementingClass := Object |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
514 |
] ifFalse:[ |
913 | 515 |
((commonSuperClass == Behavior |
516 |
or:[commonSuperClass == Class |
|
517 |
or:[commonSuperClass == ClassDescription]]) |
|
1249
780b4a1a3967
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1245
diff
changeset
|
518 |
and:[commonSuperClass includesSelector:sym]) ifTrue:[ |
913 | 519 |
msg := s , tmp , count printString , ' classes. |
520 |
||
521 |
All classes seem to respond to that message, |
|
522 |
since there is an implementation in ' , commonSuperClass name , '.' , s2. |
|
523 |
||
524 |
firstImplementingClass := commonSuperClass |
|
525 |
] ifFalse:[ |
|
526 |
" |
|
527 |
otherwise just give the number. |
|
528 |
" |
|
529 |
msg := s , tmp , count printString , ' classes.' , s2 |
|
530 |
] |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
531 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
532 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
533 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
534 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
535 |
]. |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
536 |
]. |
1185 | 537 |
shortText ifFalse:[ |
538 |
firstImplementingClass notNil ifTrue:[ |
|
539 |
WindowGroup activeGroup withWaitCursorDo:[ |
|
540 |
cm := firstImplementingClass compiledMethodAt:sym. |
|
541 |
cm notNil ifTrue:[ |
|
542 |
cm := cm methodComment. |
|
543 |
] |
|
544 |
]. |
|
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
545 |
cm notNil ifTrue:[ |
1185 | 546 |
msg := msg , '\\The comment in ' withCRs , firstImplementingClass name allBold , ' is:\' withCRs , cm allItalic. |
911
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
547 |
] |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
548 |
]. |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
549 |
]. |
be6ce6482a7f
extract the methods comment and show it.
Claus Gittinger <cg@exept.de>
parents:
839
diff
changeset
|
550 |
^ msg |
141 | 551 |
]. |
552 |
||
553 |
^ nil |
|
290
d1650b17b9e9
Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents:
263
diff
changeset
|
554 |
|
796 | 555 |
"Modified: / 17.6.1996 / 17:09:30 / stefan" |
835 | 556 |
"Created: / 23.3.1999 / 13:29:33 / cg" |
557 |
"Modified: / 23.3.1999 / 13:40:40 / cg" |
|
141 | 558 |
! |
559 |
||
1183 | 560 |
explainSelfIn:aClass short:shortText |
1244 | 561 |
|sub subNames selfString className nSubClasses| |
1198 | 562 |
|
563 |
selfString := '''' , 'self' allBold , ''''. |
|
6 | 564 |
|
1244 | 565 |
sub := aClass allSubclasses. |
566 |
nSubClasses := sub size. |
|
567 |
||
568 |
aClass isMeta ifTrue:[ |
|
569 |
className := aClass theNonMetaclass name. |
|
570 |
subNames := sub collect:[:c | c theNonMetaclass name]. |
|
571 |
nSubClasses == 0 ifTrue:[ |
|
572 |
shortText ifTrue:[ |
|
573 |
^ selfString , ' - the ''' , className , '''-class.' |
|
574 |
]. |
|
575 |
^ selfString , 'refers to the object which received the message. |
|
576 |
||
577 |
In this case, it will be the ' , className , '-class itself.' |
|
578 |
]. |
|
579 |
||
580 |
shortText ifTrue:[ |
|
581 |
nSubClasses == 1 ifTrue:[ |
|
582 |
^ selfString , ' - the ''' , className , '''- or ''' , subNames first , '''-class.' |
|
583 |
]. |
|
584 |
^ selfString , ' - the ''' , className , '''-class or one of its subclasses.' |
|
585 |
]. |
|
586 |
nSubClasses <= 5 ifTrue:[ |
|
587 |
^ selfString , ' refers to the object which received the message. |
|
588 |
||
589 |
In this case, it will be the ' , className , '-class |
|
590 |
or one of its subclasses: |
|
591 |
||
592 |
' , subNames asStringCollection asString |
|
593 |
]. |
|
594 |
||
595 |
^ selfString , ' refers to the object which received the message. |
|
596 |
||
597 |
In this case, it will be the ' , className , '-class |
|
598 |
or one of its ' , nSubClasses printString , ' subclasses.' |
|
599 |
]. |
|
600 |
||
1256 | 601 |
subNames := aClass allSubclasses collect:[:c | c theNonMetaclass name]. |
1244 | 602 |
className := aClass name. |
603 |
nSubClasses == 0 ifTrue:[ |
|
1183 | 604 |
shortText ifTrue:[ |
1244 | 605 |
^ selfString , ' - an instance of ''' , className , '''.' |
1183 | 606 |
]. |
1198 | 607 |
^ selfString , 'refers to the object which received the message. |
6 | 608 |
|
1244 | 609 |
In this case, it will be an instance of ' , className , '.' |
6 | 610 |
]. |
611 |
||
1183 | 612 |
shortText ifTrue:[ |
1244 | 613 |
nSubClasses == 1 ifTrue:[ |
1256 | 614 |
^ selfString , ' - an instance of ''' , className , ''' or ''' , subNames first , '''.' |
1185 | 615 |
]. |
1244 | 616 |
^ selfString , ' - an instance of ''' , className , ''' or one of its subclasses.' |
1183 | 617 |
]. |
1244 | 618 |
nSubClasses <= 5 ifTrue:[ |
1198 | 619 |
^ selfString , ' refers to the object which received the message. |
6 | 620 |
|
1244 | 621 |
In this case, it will be an instance of ' , className , ' |
6 | 622 |
or one of its subclasses: |
623 |
||
1256 | 624 |
' , subNames asStringCollection asString |
6 | 625 |
]. |
626 |
||
1198 | 627 |
^ selfString , ' refers to the object which received the message. |
6 | 628 |
|
1244 | 629 |
In this case, it will be an instance of ' , className , ' |
630 |
or one of its ' , nSubClasses printString , ' subclasses.' |
|
6 | 631 |
! |
632 |
||
1188 | 633 |
explainSuperIn:aClass short:shortText |
1352 | 634 |
|superName| |
1244 | 635 |
|
636 |
superName := aClass superclass name. |
|
1188 | 637 |
|
638 |
shortText ifTrue:[ |
|
1244 | 639 |
^ '''super'' - message lookup starts in ' , superName , '.' |
1188 | 640 |
]. |
641 |
||
6 | 642 |
^ 'like self, super refers to the object which received the message. |
643 |
||
644 |
However, when sending a message to super the search for methods |
|
1244 | 645 |
implementing this message will start in the superclass (' , superName , ') |
84 | 646 |
instead of the receivers class (' , aClass name , ' or subclass). |
49 | 647 |
Thus, using super, a redefined method can call the original method in its superclass.' |
6 | 648 |
! |
2 | 649 |
|
49 | 650 |
explainSyntax:string |
651 |
"try syntax ...; return explanation or nil" |
|
652 |
||
1183 | 653 |
^ self explainSyntax:string short:false |
654 |
! |
|
655 |
||
656 |
explainSyntax:string short:shortText |
|
657 |
"try syntax ...; return explanation or nil" |
|
658 |
||
49 | 659 |
((string = ':=') or:[string = '_']) ifTrue:[ |
1183 | 660 |
shortText ifTrue:[ |
661 |
^ 'Assign to variable on the left side.'. |
|
662 |
]. |
|
663 |
||
796 | 664 |
^ '<variable> := <expression> |
49 | 665 |
|
834 | 666 |
'':='' and ''_'' (which is left-arrow in some fonts) mean assignment. |
49 | 667 |
The variable is bound to (i.e. points to) the value of <expression>.' |
668 |
]. |
|
669 |
||
670 |
(string = '^') ifTrue:[ |
|
1183 | 671 |
shortText ifTrue:[ |
672 |
^ 'Return value from method.'. |
|
673 |
]. |
|
796 | 674 |
^ '^ <expression> |
49 | 675 |
|
834 | 676 |
returns the value of <expression> as value from the method. |
49 | 677 |
A return from within a block exits the method where the block is defined.' |
678 |
]. |
|
679 |
||
680 |
(string = ';') ifTrue:[ |
|
1183 | 681 |
shortText ifTrue:[ |
682 |
^ 'Cascade expression.'. |
|
683 |
]. |
|
796 | 684 |
^ '<expression> ; selector1 ; .... ; selectorN |
49 | 685 |
|
686 |
a cascade expression; evaluate expression, and send messages |
|
687 |
<selector1> ... <selectorN> to the first expressions receiver. |
|
688 |
Returns the value of the last send. The cascade sends may also have arguments.' |
|
689 |
]. |
|
690 |
||
691 |
(string = '|') ifTrue:[ |
|
1183 | 692 |
shortText ifTrue:[ |
693 |
^ ''. |
|
694 |
]. |
|
796 | 695 |
^ '| locals | or: [:arg | statements] |
49 | 696 |
|
834 | 697 |
''|'' is used to mark a local variable declaration or separates arguments |
49 | 698 |
from the statements in a block. Notice, that in a block-argument declaration |
699 |
these must be prefixed by a colon character. |
|
834 | 700 |
''|'' is also a selector understood by Booleans.' |
49 | 701 |
]. |
702 |
||
703 |
((string startsWith:'(') or:[string endsWith:')']) ifTrue:[ |
|
1183 | 704 |
shortText ifTrue:[ |
705 |
^ ''. |
|
706 |
]. |
|
796 | 707 |
^ '(<expression>) |
49 | 708 |
|
709 |
expression grouping.' |
|
710 |
]. |
|
711 |
||
712 |
((string startsWith:'[') or:[string endsWith:']']) ifTrue:[ |
|
1183 | 713 |
shortText ifTrue:[ |
714 |
^ ''. |
|
715 |
]. |
|
834 | 716 |
^ '[:arg1 .. :argN | statements] |
49 | 717 |
|
718 |
defines a block. |
|
719 |
Blocks represent pieces of executable code. Definition of a block does |
|
720 |
not evaluate it. The block is evaluated by sending it a value/value: |
|
721 |
message. |
|
722 |
Blocks are often passed as arguments to Booleans (i.e. ifTrue:[...]) or |
|
723 |
collections (i.e. do:[...]).' |
|
724 |
]. |
|
725 |
||
726 |
(string = ':') ifTrue:[ |
|
1183 | 727 |
shortText ifTrue:[ |
728 |
^ ''. |
|
729 |
]. |
|
796 | 730 |
^ 'colons have different meaning depending on context: |
49 | 731 |
|
732 |
1) they separate keyword-parts in symbols and keyword-messages as in: |
|
733 |
||
734 |
#at:put: a constant keyword symbol |
|
735 |
||
736 |
rec at:index put:value sends the #at:put: message to rec, |
|
796 | 737 |
passing index and value as arguments. |
49 | 738 |
|
739 |
2) within block-argument declarations as in: |
|
740 |
||
741 |
[:arg1 :arg2 | statements] |
|
834 | 742 |
|
743 |
3) within an identifier, they separate the nameSpace part from |
|
744 |
the name part; as in: |
|
745 |
||
746 |
Smalltalk::Array - the Array class in the Smalltalk nameSpace. |
|
747 |
Foo::Array - the Array class in the Foo nameSpace. |
|
49 | 748 |
' |
749 |
]. |
|
750 |
||
751 |
(string = '.') ifTrue:[ |
|
796 | 752 |
^ 'statement. "<- period here" |
49 | 753 |
statement |
754 |
||
755 |
within a method or block, individual statements are separated by periods. |
|
756 |
' |
|
757 |
]. |
|
758 |
||
759 |
(string startsWith:'#' ) ifTrue:[ |
|
796 | 760 |
(string startsWith:'#(' ) ifTrue:[ |
1183 | 761 |
shortText ifTrue:[ |
762 |
^ 'Array Literal.'. |
|
763 |
]. |
|
796 | 764 |
^ 'is a constant Array. |
49 | 765 |
|
766 |
The elements of a constant Array must be Number-constants, nil, true or false. |
|
767 |
(notice, that not all Smalltalk implementations allow true, false and nil as |
|
768 |
constant-Array elements).' |
|
796 | 769 |
]. |
49 | 770 |
|
796 | 771 |
(string startsWith:'#[') ifTrue:[ |
1183 | 772 |
shortText ifTrue:[ |
773 |
^ 'ByteArray Literal.'. |
|
774 |
]. |
|
796 | 775 |
^ 'is a constant ByteArray. |
49 | 776 |
|
777 |
The elements of a constant ByteArray must be Integer constants in the range |
|
778 |
0 .. 255. |
|
779 |
(notice, that not all Smalltalk implementations support constant ByteArrays).' |
|
796 | 780 |
]. |
49 | 781 |
|
796 | 782 |
(string startsWith:'#''') ifTrue:[ |
1183 | 783 |
shortText ifTrue:[ |
784 |
^ 'Symbol Literal.'. |
|
785 |
]. |
|
796 | 786 |
^ 'is a constant symbol containing non-alphanumeric characters. |
49 | 787 |
|
788 |
Symbols are unique strings, meaning that there exists |
|
789 |
exactly one instance of a given symbol. Therefore symbols can |
|
790 |
be compared using == (identity compare) in addition to = (contents compare). |
|
791 |
Beside this, Symbols behave mostly like Strings. |
|
792 |
||
793 |
Notice, that not all Smalltalk implementations support this kind of symbols.' |
|
796 | 794 |
]. |
49 | 795 |
|
1232 | 796 |
shortText ifTrue:[ |
797 |
^ 'Symbol Literal.'. |
|
798 |
]. |
|
796 | 799 |
^ 'is a symbol. |
49 | 800 |
|
801 |
Symbols are unique strings, meaning that there exists |
|
802 |
exactly one instance of a given symbol. Therefore symbols can |
|
803 |
be compared using == (identity compare) in addition to = (contents compare). |
|
804 |
Beside this, Symbols behave mostly like Strings.' |
|
805 |
]. |
|
806 |
||
807 |
"/ is it a symbol without hash-character ? |
|
808 |
"/ |
|
796 | 809 |
"/ string knownAsSymbol ifTrue:[ |
810 |
"/ ^ 'is nothing, but #' , string , ' is known as a symbol. |
|
811 |
"/ |
|
812 |
"/Symbols are unique strings, meaning that there exists |
|
813 |
"/exactly one instance of a given symbol. Therefore symbols can |
|
814 |
"/be compared using == (identity compare) in addition to = (contents compare). |
|
815 |
"/Beside this, Symbols behave mostly like Strings.' |
|
816 |
"/ ]. |
|
49 | 817 |
|
818 |
^ nil |
|
796 | 819 |
|
820 |
"Modified: / 31.10.1998 / 14:28:58 / cg" |
|
141 | 821 |
! ! |
49 | 822 |
|
396 | 823 |
!Explainer class methodsFor:'documentation'! |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
824 |
|
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
825 |
version |
1674 | 826 |
^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.63 2006-02-13 22:04:27 cg Exp $' |
146
3d407ab8ac44
suppress messages on transcript when explaining
Claus Gittinger <cg@exept.de>
parents:
141
diff
changeset
|
827 |
! ! |