Explainer.st
changeset 3049 a2d17670f62a
parent 3047 3ca3ad7eb9b7
child 3058 2709dcc6f01a
--- a/Explainer.st	Wed Mar 20 19:27:19 2013 +0100
+++ b/Explainer.st	Thu Mar 21 11:20:13 2013 +0100
@@ -539,7 +539,7 @@
      Also, there could be much more detailed explanations."
 
     |parser variables c string tmp
-     spc sym sel stringText clsName val valString|
+     spc sym sel stringText cls clsName val valString|
 
     string := someText string withoutSeparators.
     string isEmpty ifTrue:[ ^ nil ].
@@ -639,13 +639,19 @@
         (spc := aClass nameSpace) notNil ifTrue:[
             sym := (spc name , '::' , string) asSymbolIfInterned.
             sym notNil ifTrue:[
-                (Smalltalk at:sym) isBehavior ifTrue:[
+                (cls := Smalltalk at:sym) isBehavior ifTrue:[
                     string :=  stringText , ': '.
-                    (Smalltalk at:sym) name = sym ifFalse:[
-                        string :=  string , 'refers to ',(Smalltalk at:sym) name,', '
+                    cls name = sym ifFalse:[
+                        string :=  string , 'refers to ',cls name,', '
                     ].
-                    string :=  string , 'a class in the ''' , spc name , ''' nameSpace'.
-                    string := string , ' {', (Smalltalk at:sym) category ,'}'.
+                    cls isSharedPool ifTrue:[
+                        string := string , 'a sharedPool'.
+                    ] ifFalse:[
+                        string := string , 'a class'.
+                    ].
+
+                    string :=  string , ' in the ''' , spc name , ''' nameSpace'.
+                    string := string , ' {', cls category ,'}'.
                     shortText ifFalse:[
                         string := (string 
                              , '\\It is only visible within this nameSpace.'
@@ -764,22 +770,24 @@
 
         classCategory := val category ? 'uncategorized'.
         shortText ifTrue:[
-            ^ stringText , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded'])
-, ' class in ',val package,' {' , classCategory , '}.'.
+            stringText := stringText , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded']).
+            stringText := stringText , (val isSharedPool ifTrue:[' sharedPool'] ifFalse:[' class']).
+            ^ stringText , ' in ',val package,' {' , classCategory , '}.'.
         ].
 
         val name = string ifTrue:[
-            tmp := tmp , '
-' , string , ' is ' , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded'])
-, ' class categorized as ' , classCategory , '
-in the ''' , val package , ''' package.'.
+            tmp := tmp , '\' withCRs , string , ' is '.
+            tmp := tmp , (val isLoaded ifTrue:['a'] ifFalse:['an autoloaded']).
+            tmp := tmp , (val isSharedPool ifTrue:[' sharedPool'] ifFalse:[' class']).
+            tmp := tmp , ' categorized as "' , classCategory , '"'.
+            tmp := tmp , '\' withCRs , 'in the "' , val package , '" package.'.
             ^ tmp.
         ].
 
         tmp := tmp , '
 
 ' , string , ' is bound to the class ' , val name ,
-' in the ''' , classCategory , ''' category.'.
+' in the "' , classCategory , '" category.'.
         ^ tmp.
     ].
 
@@ -1459,10 +1467,10 @@
 !Explainer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.116 2013-03-19 15:58:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.117 2013-03-21 10:20:13 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.116 2013-03-19 15:58:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Explainer.st,v 1.117 2013-03-21 10:20:13 cg Exp $'
 ! !